mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
gh-113842: Add missing error check for PyIter_Next() in Python/symtable.c (GH-113843)
This commit is contained in:
parent
2e17cad2b8
commit
fda901a1ff
1 changed files with 6 additions and 0 deletions
|
@ -977,6 +977,12 @@ update_symbols(PyObject *symbols, PyObject *scopes,
|
||||||
}
|
}
|
||||||
Py_DECREF(name);
|
Py_DECREF(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Check if loop ended because of exception in PyIter_Next */
|
||||||
|
if (PyErr_Occurred()) {
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
|
||||||
Py_DECREF(itr);
|
Py_DECREF(itr);
|
||||||
Py_DECREF(v_free);
|
Py_DECREF(v_free);
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue