Skip to content

Commit 6d6471b

Browse files
[3.13] gh-148418: Fix a possible reference leak in a corrupted TYPE_CODE marshal stream (GH-148419) (GH-149364)
(cherry picked from commit c3972f2) Co-authored-by: Wulian233 <1055917385@qq.com>
1 parent 76e2501 commit 6d6471b

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
@@ -1487,7 +1487,7 @@ r_object(RFILE *p)
14871487
goto code_error;
14881488
firstlineno = (int)r_long(p);
14891489
if (firstlineno == -1 && PyErr_Occurred())
1490-
break;
1490+
goto code_error;
14911491
linetable = r_object(p);
14921492
if (linetable == NULL)
14931493
goto code_error;

0 commit comments

Comments
 (0)