diff options
Diffstat (limited to 'Python')
-rw-r--r-- | Python/symtable.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Python/symtable.c b/Python/symtable.c index 52d5932..83137b4 100644 --- a/Python/symtable.c +++ b/Python/symtable.c @@ -977,6 +977,12 @@ update_symbols(PyObject *symbols, PyObject *scopes, } Py_DECREF(name); } + + /* Check if loop ended because of exception in PyIter_Next */ + if (PyErr_Occurred()) { + goto error; + } + Py_DECREF(itr); Py_DECREF(v_free); return 1; |