Skip to content

Commit 9beed0c

Browse files
bpo-34080: Fix a memory leak in the compiler. (GH-8222)
(cherry picked from commit 993030a) Co-authored-by: Serhiy Storchaka <[email protected]>
1 parent 48d2aeb commit 9beed0c

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Fixed a memory leak in the compiler when it raised some uncommon errors
2+
during tokenizing.

Python/pythonrun.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1339,7 +1339,7 @@ err_input(perrdetail *err)
13391339
errtype = PyExc_SyntaxError;
13401340
switch (err->error) {
13411341
case E_ERROR:
1342-
return;
1342+
goto cleanup;
13431343
case E_SYNTAX:
13441344
errtype = PyExc_IndentationError;
13451345
if (err->expected == INDENT)

0 commit comments

Comments
 (0)