gh-147998: Fix possible memory leak in _pop_preserved (crossinterp.c) (GH-147999)

This commit is contained in:
Maurycy Pawłowski-Wieroński 2026-05-04 15:45:31 +02:00 committed by GitHub
parent 5235467b91
commit 72f29dc704
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View file

@ -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;