Skip to content

Commit 3b06285

Browse files
miss-islingtonserhiy-storchaka
authored andcommitted
bpo-34080: Fix a memory leak in the compiler. (GH-8222) (GH-8257)
(cherry picked from commit 993030a) Co-authored-by: Serhiy Storchaka <[email protected]>
1 parent ec75620 commit 3b06285

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
@@ -1328,7 +1328,7 @@ err_input(perrdetail *err)
13281328
errtype = PyExc_SyntaxError;
13291329
switch (err->error) {
13301330
case E_ERROR:
1331-
return;
1331+
goto cleanup;
13321332
case E_SYNTAX:
13331333
errtype = PyExc_IndentationError;
13341334
if (err->expected == INDENT)

0 commit comments

Comments
 (0)