This commit is contained in:
Raymond Hettinger 2016-11-11 04:32:11 -08:00
parent ac40c6c575
commit b2b154374d
1 changed files with 3 additions and 2 deletions

View File

@ -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();
}