summaryrefslogtreecommitdiffstats
path: root/Python/sysmodule.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2014-02-09 11:33:53 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2014-02-09 11:33:53 (GMT)
commit505ff755d704c73ac613d3e8fed02c79c6ae555a (patch)
treeb9b0142cbeca125a1bcf0413e48d938d0cd390d3 /Python/sysmodule.c
parente9c31470e1680b7c9b9ee83c378b891e90ac58ab (diff)
downloadcpython-505ff755d704c73ac613d3e8fed02c79c6ae555a.zip
cpython-505ff755d704c73ac613d3e8fed02c79c6ae555a.tar.gz
cpython-505ff755d704c73ac613d3e8fed02c79c6ae555a.tar.bz2
Issue #20437: Fixed 21 potential bugs when deleting objects references.
Diffstat (limited to 'Python/sysmodule.c')
-rw-r--r--Python/sysmodule.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
index 222630c..2f700e6 100644
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -395,8 +395,7 @@ trace_trampoline(PyObject *self, PyFrameObject *frame,
result = call_trampoline(tstate, callback, frame, what, arg);
if (result == NULL) {
PyEval_SetTrace(NULL, NULL);
- Py_XDECREF(frame->f_trace);
- frame->f_trace = NULL;
+ Py_CLEAR(frame->f_trace);
return -1;
}
if (result != Py_None) {