summaryrefslogtreecommitdiffstats
path: root/Python/compile.c
diff options
context:
space:
mode:
authorValery Fedorenko <federicovalenso@gmail.com>2024-11-05 17:34:33 (GMT)
committerGitHub <noreply@github.com>2024-11-05 17:34:33 (GMT)
commit8525c9375f25e6ec0c0b5dfcab464703f6e78082 (patch)
tree9ab19ec002ac489e7f5e8edfd014cc83f86e738e /Python/compile.c
parent0b67ce930a56c4ffd597b1a658ddcbacfb40e798 (diff)
downloadcpython-8525c9375f25e6ec0c0b5dfcab464703f6e78082.zip
cpython-8525c9375f25e6ec0c0b5dfcab464703f6e78082.tar.gz
cpython-8525c9375f25e6ec0c0b5dfcab464703f6e78082.tar.bz2
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 <zintensitydev@gmail.com>
Diffstat (limited to 'Python/compile.c')
-rw-r--r--Python/compile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/compile.c b/Python/compile.c
index 4dcb9a1..ecca9b0 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;