]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-34080: Fix a memory leak in the compiler. (GH-8222)
authorSerhiy Storchaka <storchaka@gmail.com>
Wed, 11 Jul 2018 21:17:53 +0000 (00:17 +0300)
committerVictor Stinner <vstinner@redhat.com>
Wed, 11 Jul 2018 21:17:53 +0000 (23:17 +0200)
Misc/NEWS.d/next/Core and Builtins/2018-07-10-11-24-16.bpo-34080.8t7PtO.rst [new file with mode: 0644]
Python/pythonrun.c

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 (file)
index 0000000..cfc53cc
--- /dev/null
@@ -0,0 +1,2 @@
+Fixed a memory leak in the compiler when it raised some uncommon errors
+during tokenizing.
index bcd1ca931d03d3dfac34f527560decdd68d50379..10605db0b6025bfcf392e141bfee65eeacd86440 100644 (file)
@@ -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)