Skip to content

Commit c3972f2

Browse files
authored
gh-148418: Fix a possible reference leak in a corrupted TYPE_CODE marshal stream (GH-148419)
1 parent ce51c18 commit c3972f2

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix a possible reference leak in a corrupted ``TYPE_CODE`` marshal stream.

Python/marshal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1636,7 +1636,7 @@ r_object(RFILE *p)
16361636
goto code_error;
16371637
firstlineno = (int)r_long(p);
16381638
if (firstlineno == -1 && PyErr_Occurred())
1639-
break;
1639+
goto code_error;
16401640
linetable = r_object(p);
16411641
if (linetable == NULL)
16421642
goto code_error;

0 commit comments

Comments
 (0)