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>
This commit is contained in:
Valery Fedorenko 2024-11-05 20:34:33 +03:00 committed by GitHub
parent 0b67ce930a
commit 8525c9375f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View 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;