summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2016-11-22 19:50:56 (GMT)
committerRaymond Hettinger <python@rcn.com>2016-11-22 19:50:56 (GMT)
commit3fa28fd07570708962404b97d6200386bd571b51 (patch)
tree4a02394fc101e381441ea4df742c43febd9fda3e /Python
parentbbf32e1c9875ab8237a00a20ebc62e5d752adeda (diff)
parent64e2f9ac86b0f7aade2fe331136beceee975fc91 (diff)
downloadcpython-3fa28fd07570708962404b97d6200386bd571b51.zip
cpython-3fa28fd07570708962404b97d6200386bd571b51.tar.gz
cpython-3fa28fd07570708962404b97d6200386bd571b51.tar.bz2
merge
Diffstat (limited to 'Python')
-rw-r--r--Python/ceval.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index b18fd91..b4953a9 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -3146,8 +3146,10 @@ _PyEval_EvalFrameDefault(PyFrameObject *f, int throwflag)
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);