]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-126238: Fix possible null pointer dereference of freevars in _PyCompile_LookupArg...
authorValery Fedorenko <federicovalenso@gmail.com>
Tue, 5 Nov 2024 17:34:33 +0000 (20:34 +0300)
committerGitHub <noreply@github.com>
Tue, 5 Nov 2024 17:34:33 +0000 (20:34 +0300)
* 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 <zintensitydev@gmail.com>
Python/compile.c

index 4dcb9a1b5acdb3d4d098fb2a17889daedc9a3927..ecca9b0b06ecf73005f9c6dcb6251715ed7bc995 100644 (file)
@@ -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;