Commit fc439d20 authored by Zackery Spytz's avatar Zackery Spytz Committed by Serhiy Storchaka

Fix a possible decref of a borrowed reference in symtable.c. (GH-9786)

parent 9b8c2e76
...@@ -625,8 +625,10 @@ update_symbols(PyObject *symbols, PyObject *scopes, ...@@ -625,8 +625,10 @@ update_symbols(PyObject *symbols, PyObject *scopes,
return 0; return 0;
itr = PyObject_GetIter(free); itr = PyObject_GetIter(free);
if (!itr) if (itr == NULL) {
goto error; Py_DECREF(v_free);
return 0;
}
while ((name = PyIter_Next(itr))) { while ((name = PyIter_Next(itr))) {
v = PyDict_GetItem(symbols, name); v = PyDict_GetItem(symbols, name);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment