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]