summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2001-12-07 15:35:35 (GMT)
committerJeremy Hylton <jeremy@alum.mit.edu>2001-12-07 15:35:35 (GMT)
commit0702858d733e1ab37e3e7bb6258557fd7aca3d10 (patch)
treea736c327b08ff793f2b70b9cf7e8fca6117bb19b
parent038215ab0c8157b00f9112a7be245abf1fbccb16 (diff)
downloadcpython-0702858d733e1ab37e3e7bb6258557fd7aca3d10.zip
cpython-0702858d733e1ab37e3e7bb6258557fd7aca3d10.tar.gz
cpython-0702858d733e1ab37e3e7bb6258557fd7aca3d10.tar.bz2
Missing DECREFs when exception is raised in sys.excepthook.
Bug fix candidate for 2.1 branch. (I imagine the other recent leak patches are bug fix candidates, too, but I forgot to mark mine as such.)
-rw-r--r--Python/pythonrun.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index a8ad845..4294c97 100644
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -895,6 +895,9 @@ PyErr_PrintEx(int set_sys_last_vars)
PyErr_Display(exception2, v2, tb2);
PySys_WriteStderr("\nOriginal exception was:\n");
PyErr_Display(exception, v, tb);
+ Py_XDECREF(exception2);
+ Py_XDECREF(v2);
+ Py_XDECREF(tb2);
}
Py_XDECREF(result);
Py_XDECREF(args);