From f02d84eae4a6386a84181858f334c55860a8e208 Mon Sep 17 00:00:00 2001 From: Matthias Bussonnier Date: Sat, 25 Feb 2017 21:58:05 -0800 Subject: [PATCH] bpo-29655: Fixed possible reference leaks in `import *`. (#301) Original patch by Matthias Bussonnier. (cherry picked from commit 160edb43571311a3785785c1dfa784afc52d87be) --- Python/ceval.c | 1 + 1 file changed, 1 insertion(+) diff --git a/Python/ceval.c b/Python/ceval.c index 733f0776ecfbcc..09836519988ae6 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);