https://github.com/python/cpython/commit/72f29dc704812aa846b10323a31743d6df37cc2c
commit: 72f29dc704812aa846b10323a31743d6df37cc2c
branch: main
author: Maurycy Pawłowski-Wieroński <[email protected]>
committer: serhiy-storchaka <[email protected]>
date: 2026-05-04T16:45:31+03:00
summary:
gh-147998: Fix possible memory leak in _pop_preserved (crossinterp.c)
(GH-147999)
files:
A
Misc/NEWS.d/next/Core_and_Builtins/2026-04-02-13-25-09.gh-issue-147998.wnzkRT.rst
M Python/crossinterp.c
diff --git
a/Misc/NEWS.d/next/Core_and_Builtins/2026-04-02-13-25-09.gh-issue-147998.wnzkRT.rst
b/Misc/NEWS.d/next/Core_and_Builtins/2026-04-02-13-25-09.gh-issue-147998.wnzkRT.rst
new file mode 100644
index 00000000000000..e83d9929eae5e0
--- /dev/null
+++
b/Misc/NEWS.d/next/Core_and_Builtins/2026-04-02-13-25-09.gh-issue-147998.wnzkRT.rst
@@ -0,0 +1,3 @@
+Fixed a memory leak in interpreter helper calls so cleanup works when an
+operation falls across interpreter boundaries. Patch by Maurycy
+Pawłowski-Wieroński.
diff --git a/Python/crossinterp.c b/Python/crossinterp.c
index 4cd4b32ef906bb..6b489bf03f86ec 100644
--- a/Python/crossinterp.c
+++ b/Python/crossinterp.c
@@ -3006,7 +3006,7 @@ _pop_preserved(_PyXI_session *session,
*p_xidata = NULL;
}
else {
- _PyXI_namespace *xidata = _create_sharedns(session->_preserved);
+ xidata = _create_sharedns(session->_preserved);
if (xidata == NULL) {
failure.code = _PyXI_ERR_PRESERVE_FAILURE;
goto error;
_______________________________________________
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]