From: Valery Fedorenko Date: Tue, 5 Nov 2024 17:34:33 +0000 (+0300) Subject: gh-126238: Fix possible null pointer dereference of freevars in _PyCompile_LookupArg... X-Git-Tag: v3.14.0a2~166 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8525c9375f25e6ec0c0b5dfcab464703f6e78082;p=thirdparty%2FPython%2Fcpython.git 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 --- diff --git a/Python/compile.c b/Python/compile.c index 4dcb9a1b5acd..ecca9b0b06ec 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;