Skip to content

Commit fc390bd

Browse files
[3.14] gh-147998: Fix possible memory leak in _pop_preserved (crossinterp.c) (GH-147999) (GH-149365)
(cherry picked from commit 72f29dc) Co-authored-by: Maurycy Pawłowski-Wieroński <maurycy@maurycy.com>
1 parent 95979d1 commit fc390bd

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Fixed a memory leak in interpreter helper calls so cleanup works when an
2+
operation falls across interpreter boundaries. Patch by Maurycy
3+
Pawłowski-Wieroński.

Python/crossinterp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2965,7 +2965,7 @@ _pop_preserved(_PyXI_session *session,
29652965
*p_xidata = NULL;
29662966
}
29672967
else {
2968-
_PyXI_namespace *xidata = _create_sharedns(session->_preserved);
2968+
xidata = _create_sharedns(session->_preserved);
29692969
if (xidata == NULL) {
29702970
failure.code = _PyXI_ERR_PRESERVE_FAILURE;
29712971
goto error;

0 commit comments

Comments
 (0)