summaryrefslogtreecommitdiffstats
path: root/Objects/frameobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/frameobject.c')
-rw-r--r--Objects/frameobject.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/Objects/frameobject.c b/Objects/frameobject.c
index 2c8fb01..bf1c7c5 100644
--- a/Objects/frameobject.c
+++ b/Objects/frameobject.c
@@ -340,6 +340,11 @@ frame_setlineno(PyFrameObject *f, PyObject* p_new_lineno)
PyObject *v = (*--f->f_stacktop);
Py_DECREF(v);
}
+ if (b->b_type == SETUP_WITH) {
+ /* Pop the exit function. */
+ PyObject *v = (*--f->f_stacktop);
+ Py_DECREF(v);
+ }
}
/* Finally set the new f_lineno and f_lasti and return OK. */