summaryrefslogtreecommitdiff
path: root/Python/sysmodule.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2014-02-09 13:14:04 +0200
committerSerhiy Storchaka <storchaka@gmail.com>2014-02-09 13:14:04 +0200
commit98a9722e4a82b5f7dc0411233bbec892a02c7667 (patch)
tree51179bb7d80e822a18d0ccbb41fde7198f424813 /Python/sysmodule.c
parent2cfae9b03f706e0d6889dfecc21f87419d926b00 (diff)
downloadcpython-git-98a9722e4a82b5f7dc0411233bbec892a02c7667.tar.gz
Issue #20437: Fixed 43 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 2c364af0b7..560ea4eb6e 100644
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -367,8 +367,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) {