Skip to content

Commit a45fa39

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 ef19fd2 commit a45fa39

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
@@ -1590,7 +1590,7 @@ err_input(perrdetail *err)
15901590
errtype = PyExc_SyntaxError;
15911591
switch (err->error) {
15921592
case E_ERROR:
1593-
return;
1593+
goto cleanup;
15941594
case E_SYNTAX:
15951595
errtype = PyExc_IndentationError;
15961596
if (err->expected == INDENT)

0 commit comments

Comments
 (0)