mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08:00
Fix a possible decref of a borrowed reference in symtable.c. (GH-9786)
This commit is contained in:
committed by
Serhiy Storchaka
parent
9b8c2e7676
commit
fc439d20de
@@ -625,8 +625,10 @@ update_symbols(PyObject *symbols, PyObject *scopes,
|
||||
return 0;
|
||||
|
||||
itr = PyObject_GetIter(free);
|
||||
if (!itr)
|
||||
goto error;
|
||||
if (itr == NULL) {
|
||||
Py_DECREF(v_free);
|
||||
return 0;
|
||||
}
|
||||
|
||||
while ((name = PyIter_Next(itr))) {
|
||||
v = PyDict_GetItem(symbols, name);
|
||||
|
||||
Reference in New Issue
Block a user