From: Guido van Rossum Date: Fri, 23 Mar 2001 04:01:07 +0000 (+0000) Subject: Fix memory leak with SyntaxError. (The DECREF was originally hidden X-Git-Tag: v2.1b2~49 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4131830c23727aac262291934007c0b731b6e00c;p=python Fix memory leak with SyntaxError. (The DECREF was originally hidden inside a piece of code that was deemed reduntant; the DECREF was unfortunately *not* redundant!) --- diff --git a/Python/pythonrun.c b/Python/pythonrun.c index 6fa85ac08c..bb5e482829 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -1201,6 +1201,7 @@ err_input(perrdetail *err) break; } w = Py_BuildValue("(sO)", msg, v); + Py_XDECREF(v); PyErr_SetObject(errtype, w); Py_XDECREF(w); }