https://github.com/python/cpython/commit/fc390bdceee66fff17cfb80d23235e7bb0b429dd commit: fc390bdceee66fff17cfb80d23235e7bb0b429dd branch: 3.14 author: Miss Islington (bot) <[email protected]> committer: serhiy-storchaka <[email protected]> date: 2026-05-04T14:11:04Z summary:
[3.14] gh-147998: Fix possible memory leak in _pop_preserved (crossinterp.c) (GH-147999) (GH-149365) (cherry picked from commit 72f29dc704812aa846b10323a31743d6df37cc2c) Co-authored-by: Maurycy Pawłowski-Wieroński <[email protected]> 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 3b6c0c6e1eda4b..ba31f356d511f0 100644 --- a/Python/crossinterp.c +++ b/Python/crossinterp.c @@ -2965,7 +2965,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]
