Skip to content

Commit 72f29dc

Browse files
authored
gh-147998: Fix possible memory leak in _pop_preserved (crossinterp.c) (GH-147999)
1 parent 5235467 commit 72f29dc

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
@@ -3006,7 +3006,7 @@ _pop_preserved(_PyXI_session *session,
30063006
*p_xidata = NULL;
30073007
}
30083008
else {
3009-
_PyXI_namespace *xidata = _create_sharedns(session->_preserved);
3009+
xidata = _create_sharedns(session->_preserved);
30103010
if (xidata == NULL) {
30113011
failure.code = _PyXI_ERR_PRESERVE_FAILURE;
30123012
goto error;

0 commit comments

Comments
 (0)