Skip to content

Commit 1edbf3a

Browse files
committed
Fix _PyCode_New() failure cleanup for co_tlbc and replacement_locations
1 parent 9242700 commit 1edbf3a

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Objects/codeobject.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -744,6 +744,7 @@ _PyCode_New(struct _PyCodeConstructor *con)
744744
}
745745

746746
if (init_code(co, con) < 0) {
747+
Py_XDECREF(replacement_locations);
747748
Py_DECREF(co);
748749
return NULL;
749750
}

0 commit comments

Comments
 (0)