summaryrefslogtreecommitdiffstats
path: root/Python/ceval.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/ceval.c')
-rw-r--r--Python/ceval.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index d323908..62badeb 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -2832,13 +2832,16 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
TARGET(IMPORT_STAR) {
PyObject *from = POP(), *locals;
int err;
- if (PyFrame_FastToLocalsWithError(f) < 0)
+ if (PyFrame_FastToLocalsWithError(f) < 0) {
+ Py_DECREF(from);
goto error;
+ }
locals = f->f_locals;
if (locals == NULL) {
PyErr_SetString(PyExc_SystemError,
"no locals found during 'import *'");
+ Py_DECREF(from);
goto error;
}
READ_TIMESTAMP(intr0);