summaryrefslogtreecommitdiff
path: root/Python/sysmodule.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2014-02-09 13:33:53 +0200
committerSerhiy Storchaka <storchaka@gmail.com>2014-02-09 13:33:53 +0200
commitc2d47e10f770f449ed811e1de8a6fd8a6cb408c9 (patch)
tree202c6f694a7003b8b2814a615748e57b9110ab9a /Python/sysmodule.c
parent8be62cb433ac40e3d51869352c5ee5bd1cd7df53 (diff)
downloadcpython-c2d47e10f770f449ed811e1de8a6fd8a6cb408c9.tar.gz
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 222630c169..2f700e6507 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) {