summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2016-11-11 12:32:11 (GMT)
committerRaymond Hettinger <python@rcn.com>2016-11-11 12:32:11 (GMT)
commitb2b154374d921cccaf5de9faf633a6ae6e21892b (patch)
treeed2916ef00ff286c29018841fcb444dc4e65dde1 /Python
parentac40c6c575d2f6e619b998b7b91437f6a93bcde2 (diff)
downloadcpython-b2b154374d921cccaf5de9faf633a6ae6e21892b.zip
cpython-b2b154374d921cccaf5de9faf633a6ae6e21892b.tar.gz
cpython-b2b154374d921cccaf5de9faf633a6ae6e21892b.tar.bz2
merge
Diffstat (limited to 'Python')
-rw-r--r--Python/ceval.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index d08b316..fe562a8 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -2468,8 +2468,9 @@ _PyEval_EvalFrameDefault(PyFrameObject *f, int throwflag)
TARGET(STORE_DEREF) {
PyObject *v = POP();
PyObject *cell = freevars[oparg];
- PyCell_Set(cell, v);
- Py_DECREF(v);
+ PyObject *oldobj = PyCell_GET(cell);
+ PyCell_SET(cell, v);
+ Py_XDECREF(oldobj);
DISPATCH();
}