gh-150546: Fix cleanup for replacement_locations in _PyCode_New() (#150549)
kumaraditya303 <[email protected]> Fri, 24 Jul 2026 07:42:43 -0400 (EDT)
| Newsgroups | gmane.comp.python.cvs |
|---|---|
| Message-ID | <[email protected]> |
https://github.com/python/cpython/commit/a096314ca940285714d5e3928c7e47cf7aebb1cc commit: a096314ca940285714d5e3928c7e47cf7aebb1cc branch: main author: stevens <[email protected]> committer: kumaraditya303 <[email protected]> date: 2026-07-24T17:12:29+05:30 summary: gh-150546: Fix cleanup for replacement_locations in _PyCode_New() (#150549) files: M Objects/codeobject.c diff --git a/Objects/codeobject.c b/Objects/codeobject.c index 03036020b1cb1a..d7955cc7390a7a 100644 --- a/Objects/codeobject.c +++ b/Objects/codeobject.c @@ -748,6 +748,7 @@ _PyCode_New(struct _PyCodeConstructor *con) #endif if (init_code(co, con) < 0) { + Py_XDECREF(replacement_locations); Py_DECREF(co); return NULL; } _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3//lists/python-checkins.python.org Member address: [email protected]