From: Zackery Spytz Date: Thu, 11 Oct 2018 05:05:35 +0000 (-0600) Subject: Fix a possible decref of a borrowed reference in symtable.c. (GH-9786) X-Git-Tag: v3.8.0a1~794 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fc439d20de32b0ebccca79a96e31f83b85ec4eaf;p=thirdparty%2FPython%2Fcpython.git Fix a possible decref of a borrowed reference in symtable.c. (GH-9786) --- diff --git a/Python/symtable.c b/Python/symtable.c index 16b706b36338..d74f26fbe35a 100644 --- a/Python/symtable.c +++ b/Python/symtable.c @@ -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);