]> granicus.if.org Git - python/commitdiff
Fix memory leak with SyntaxError. (The DECREF was originally hidden
authorGuido van Rossum <guido@python.org>
Fri, 23 Mar 2001 04:01:07 +0000 (04:01 +0000)
committerGuido van Rossum <guido@python.org>
Fri, 23 Mar 2001 04:01:07 +0000 (04:01 +0000)
inside a piece of code that was deemed reduntant; the DECREF was
unfortunately *not* redundant!)

Python/pythonrun.c

index 6fa85ac08cd0479d542f75a95d58cc846c96d501..bb5e48282973bbc4e162fc9ac321b8f0d279ec56 100644 (file)
@@ -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);
 }