summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2016-05-17 05:53:44 (GMT)
committerBenjamin Peterson <benjamin@python.org>2016-05-17 05:53:44 (GMT)
commit5b2b3aae2ae3e456209cb723d9aeceb242c9498e (patch)
treefaebbcf0a5a6ddd28c7843a210e067722b272b9c /Python
parent2deb1eafece1ef4c8e0f1b168d4b85ba23c3ac9d (diff)
parentad887cf7d1257e73819fa9fd926f15849192888c (diff)
downloadcpython-5b2b3aae2ae3e456209cb723d9aeceb242c9498e.zip
cpython-5b2b3aae2ae3e456209cb723d9aeceb242c9498e.tar.gz
cpython-5b2b3aae2ae3e456209cb723d9aeceb242c9498e.tar.bz2
merge 3.5 (#26991)
Diffstat (limited to 'Python')
-rw-r--r--Python/ceval.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index b461030..9870a55 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -3291,6 +3291,7 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
PyObject *anns = PyDict_New();
if (anns == NULL) {
Py_DECREF(func);
+ Py_DECREF(names);
goto error;
}
name_ix = PyTuple_Size(names);
@@ -3306,9 +3307,11 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
if (err != 0) {
Py_DECREF(anns);
Py_DECREF(func);
+ Py_DECREF(names);
goto error;
}
}
+ Py_DECREF(names);
if (PyFunction_SetAnnotations(func, anns) != 0) {
/* Can't happen unless
@@ -3318,7 +3321,6 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
goto error;
}
Py_DECREF(anns);
- Py_DECREF(names);
}
/* XXX Maybe this should be a separate opcode? */