From: Serhiy Storchaka Date: Wed, 8 Mar 2017 11:44:33 +0000 (+0200) Subject: bpo-29655: Fixed possible reference leaks in `import *`. (#301) (#510) X-Git-Tag: v2.7.14rc1~253 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9fbb65e6464b56c6d677090e185c9fe16a80ed96;p=thirdparty%2FPython%2Fcpython.git bpo-29655: Fixed possible reference leaks in `import *`. (#301) (#510) Original patch by Matthias Bussonnier. (cherry picked from commit 160edb43571311a3785785c1dfa784afc52d87be) --- diff --git a/Python/ceval.c b/Python/ceval.c index 733f0776ecfb..09836519988a 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -2641,6 +2641,7 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag) if ((x = f->f_locals) == NULL) { PyErr_SetString(PyExc_SystemError, "no locals found during 'import *'"); + Py_DECREF(v); break; } READ_TIMESTAMP(intr0);