From e628d8bcd050e3e4b4d9193b0fb3d0021752ef29 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Tue, 10 Jul 2018 11:24:23 +0300 Subject: [PATCH] bpo-34080: Fix a memory leak in the compiler. --- .../Core and Builtins/2018-07-10-11-24-16.bpo-34080.8t7PtO.rst | 2 ++ Python/pythonrun.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 Misc/NEWS.d/next/Core and Builtins/2018-07-10-11-24-16.bpo-34080.8t7PtO.rst 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 00000000000000..cfc53cca487907 --- /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 bcd1ca931d03d3..10605db0b6025b 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)