From: Serhiy Storchaka Date: Wed, 11 Jul 2018 21:17:53 +0000 (+0300) Subject: bpo-34080: Fix a memory leak in the compiler. (GH-8222) X-Git-Tag: v3.8.0a1~1377 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=993030aac576710a46b3dd0b4864f819d4a94145;p=thirdparty%2FPython%2Fcpython.git bpo-34080: Fix a memory leak in the compiler. (GH-8222) --- diff --git a/Misc/NEWS.d/next/Core and Builtins/2018-07-10-11-24-16.bpo-34080.8t7PtO.rst b/Misc/NEWS.d/next/Core and Builtins/2018-07-10-11-24-16.bpo-34080.8t7PtO.rst new file mode 100644 index 000000000000..cfc53cca4879 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2018-07-10-11-24-16.bpo-34080.8t7PtO.rst @@ -0,0 +1,2 @@ +Fixed a memory leak in the compiler when it raised some uncommon errors +during tokenizing. diff --git a/Python/pythonrun.c b/Python/pythonrun.c index bcd1ca931d03..10605db0b602 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -1339,7 +1339,7 @@ err_input(perrdetail *err) errtype = PyExc_SyntaxError; switch (err->error) { case E_ERROR: - return; + goto cleanup; case E_SYNTAX: errtype = PyExc_IndentationError; if (err->expected == INDENT)