https://github.com/python/cpython/commit/8525c9375f25e6ec0c0b5dfcab464703f6e78082
commit: 8525c9375f25e6ec0c0b5dfcab464703f6e78082
branch: main
author: Valery Fedorenko <[email protected]>
committer: sobolevn <[email protected]>
date: 2024-11-05T20:34:33+03:00
summary:

gh-126238: Fix possible null pointer dereference of freevars in 
_PyCompile_LookupArg (#126239)

* Replace Py_DECREF by Py_XDECREF

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Peter Bierma <[email protected]>

files:
M Python/compile.c

diff --git a/Python/compile.c b/Python/compile.c
index 4dcb9a1b5acdb3..ecca9b0b06ecf7 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -901,7 +901,7 @@ _PyCompile_LookupArg(compiler *c, PyCodeObject *co, 
PyObject *name)
             c->u->u_metadata.u_name,
             co->co_name,
             freevars);
-        Py_DECREF(freevars);
+        Py_XDECREF(freevars);
         return ERROR;
     }
     return arg;

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to