diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2018-07-11 21:17:53 (GMT) |
---|---|---|
committer | Victor Stinner <vstinner@redhat.com> | 2018-07-11 21:17:53 (GMT) |
commit | 993030aac576710a46b3dd0b4864f819d4a94145 (patch) | |
tree | 1187fb352dacedee71b7c52b446f4ec5ae645d87 | |
parent | b12112b5ba608cdd7a0962a6b18cad4fe58b46e6 (diff) | |
download | cpython-993030aac576710a46b3dd0b4864f819d4a94145.zip cpython-993030aac576710a46b3dd0b4864f819d4a94145.tar.gz cpython-993030aac576710a46b3dd0b4864f819d4a94145.tar.bz2 |
bpo-34080: Fix a memory leak in the compiler. (GH-8222)
-rw-r--r-- | Misc/NEWS.d/next/Core and Builtins/2018-07-10-11-24-16.bpo-34080.8t7PtO.rst | 2 | ||||
-rw-r--r-- | Python/pythonrun.c | 2 |
2 files changed, 3 insertions, 1 deletions
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 0000000..cfc53cc --- /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 bcd1ca9..10605db 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) |