diff options
author | Raymond Hettinger <python@rcn.com> | 2016-11-22 19:50:56 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2016-11-22 19:50:56 (GMT) |
commit | 3fa28fd07570708962404b97d6200386bd571b51 (patch) | |
tree | 4a02394fc101e381441ea4df742c43febd9fda3e /Python | |
parent | bbf32e1c9875ab8237a00a20ebc62e5d752adeda (diff) | |
parent | 64e2f9ac86b0f7aade2fe331136beceee975fc91 (diff) | |
download | cpython-3fa28fd07570708962404b97d6200386bd571b51.zip cpython-3fa28fd07570708962404b97d6200386bd571b51.tar.gz cpython-3fa28fd07570708962404b97d6200386bd571b51.tar.bz2 |
merge
Diffstat (limited to 'Python')
-rw-r--r-- | Python/ceval.c | 4 |
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); |