Skip to content

Commit a096314

Browse files
authored
gh-150546: Fix cleanup for replacement_locations in _PyCode_New() (#150549)
1 parent ee21d99 commit a096314

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
@@ -748,6 +748,7 @@ _PyCode_New(struct _PyCodeConstructor *con)
748748
#endif
749749

750750
if (init_code(co, con) < 0) {
751+
Py_XDECREF(replacement_locations);
751752
Py_DECREF(co);
752753
return NULL;
753754
}

0 commit comments

Comments
 (0)