Mercurial > cpython-lru_cache-weakref
diff Python/pythonrun.c @ 21284:43b8a962a32a legacy-trunk
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.)
| author | Jeremy Hylton <jeremy@alum.mit.edu> |
|---|---|
| date | Fri, 07 Dec 2001 15:35:35 +0000 |
| parents | 45e1177424e1 |
| children | c64fc56f6072 |
line wrap: on
line diff
--- a/Python/pythonrun.c Fri Dec 07 14:22:13 2001 +0000 +++ b/Python/pythonrun.c Fri Dec 07 15:35:35 2001 +0000 @@ -895,6 +895,9 @@ 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);
