We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 02a4018 commit 64e2f9aCopy full SHA for 64e2f9a
1 file changed
Python/ceval.c
@@ -3138,8 +3138,10 @@ _PyEval_EvalFrameDefault(PyFrameObject *f, int throwflag)
3138
if (enter == NULL)
3139
goto error;
3140
exit = special_lookup(mgr, &PyId___exit__);
3141
- if (exit == NULL)
+ if (exit == NULL) {
3142
+ Py_DECREF(enter);
3143
3144
+ }
3145
SET_TOP(exit);
3146
Py_DECREF(mgr);
3147
res = PyObject_CallFunctionObjArgs(enter, NULL);
0 commit comments