From 505ff755d704c73ac613d3e8fed02c79c6ae555a Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Sun, 9 Feb 2014 13:33:53 +0200 Subject: Issue #20437: Fixed 21 potential bugs when deleting objects references. --- Python/sysmodule.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'Python/sysmodule.c') diff --git a/Python/sysmodule.c b/Python/sysmodule.c index 222630c1693..2f700e65071 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) { -- cgit v1.2.3