Commit f4ffd8c6 authored by Raymond Hettinger's avatar Raymond Hettinger

Issue #27100: Fix ref leak

parent fbc56909
......@@ -3138,8 +3138,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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment