[Python-checkins] cpython (3.6): Issue #27100: Fix ref leak
raymond.hettinger
python-checkins at python.org
Tue Nov 22 14:51:05 EST 2016
https://hg.python.org/cpython/rev/749c5d6c4ba5
changeset: 105340:749c5d6c4ba5
branch: 3.6
parent: 105338:089886be06df
user: Raymond Hettinger <python at rcn.com>
date: Tue Nov 22 11:50:40 2016 -0800
summary:
Issue #27100: Fix ref leak
files:
Python/ceval.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/Python/ceval.c b/Python/ceval.c
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -3138,8 +3138,10 @@
if (enter == NULL)
goto error;
exit = special_lookup(mgr, &PyId___exit__);
- if (exit == NULL)
+ if (exit == NULL) {
+ Py_DECREF(enter);
goto error;
+ }
SET_TOP(exit);
Py_DECREF(mgr);
res = PyObject_CallFunctionObjArgs(enter, NULL);
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list