mirror of
https://github.com/python/cpython.git
synced 2026-05-07 05:01:13 -04:00
[3.12] Fix possible null pointer dereference of freevars in _PyCompile_LookupArg (gh-126238) (#126474)
[3.12] gh-126238: Fix possible null pointer dereference of freevars in _PyCompile_LookupArg (GH-126239)
* Replace Py_DECREF by Py_XDECREF
(cherry picked from commit 8525c9375f)
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
This commit is contained in:
+1
-1
@@ -1835,7 +1835,7 @@ compiler_make_closure(struct compiler *c, location loc,
|
||||
c->u->u_metadata.u_name,
|
||||
co->co_name,
|
||||
freevars);
|
||||
Py_DECREF(freevars);
|
||||
Py_XDECREF(freevars);
|
||||
return ERROR;
|
||||
}
|
||||
ADDOP_I(c, loc, LOAD_CLOSURE, arg);
|
||||
|
||||
Reference in New Issue
Block a user