diff options
Diffstat (limited to 'Objects/frameobject.c')
-rw-r--r-- | Objects/frameobject.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Objects/frameobject.c b/Objects/frameobject.c index 62f9f34..5c73e85 100644 --- a/Objects/frameobject.c +++ b/Objects/frameobject.c @@ -317,6 +317,13 @@ frame_setlineno(PyFrameObject *f, PyObject* p_new_lineno) PyObject *v = (*--f->f_stacktop); Py_DECREF(v); } + if (b->b_type == SETUP_FINALLY && + code[b->b_handler] == WITH_CLEANUP_START) + { + /* Pop the exit function. */ + PyObject *v = (*--f->f_stacktop); + Py_DECREF(v); + } } /* Finally set the new f_lineno and f_lasti and return OK. */ |