summaryrefslogtreecommitdiffstats
path: root/Python/ceval.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2014-02-09 11:14:04 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2014-02-09 11:14:04 (GMT)
commit98a9722e4a82b5f7dc0411233bbec892a02c7667 (patch)
tree51179bb7d80e822a18d0ccbb41fde7198f424813 /Python/ceval.c
parent2cfae9b03f706e0d6889dfecc21f87419d926b00 (diff)
downloadcpython-98a9722e4a82b5f7dc0411233bbec892a02c7667.zip
cpython-98a9722e4a82b5f7dc0411233bbec892a02c7667.tar.gz
cpython-98a9722e4a82b5f7dc0411233bbec892a02c7667.tar.bz2
Issue #20437: Fixed 43 potential bugs when deleting objects references.
Diffstat (limited to 'Python/ceval.c')
-rw-r--r--Python/ceval.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index 06ada97..18bc66b 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -3240,8 +3240,7 @@ PyEval_EvalCodeEx(PyCodeObject *co, PyObject *globals, PyObject *locals,
if (co->co_flags & CO_GENERATOR) {
/* Don't need to keep the reference to f_back, it will be set
* when the generator is resumed. */
- Py_XDECREF(f->f_back);
- f->f_back = NULL;
+ Py_CLEAR(f->f_back);
PCALL(PCALL_GENERATOR);