mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
[3.13] gh-140306: Fix memory leaks in cross-interpreter data handling (GH-140307) (GH-140357)
(cherry picked from commit f9323213c9)
Co-authored-by: Shamil <ashm.tech@proton.me>
This commit is contained in:
parent
e5ebcabc6b
commit
d7473f7a47
4 changed files with 6 additions and 4 deletions
|
|
@ -455,8 +455,8 @@ _release_xid_data(_PyCrossInterpreterData *data, int rawfree)
|
|||
{
|
||||
PyObject *exc = PyErr_GetRaisedException();
|
||||
int res = rawfree
|
||||
? _PyCrossInterpreterData_Release(data)
|
||||
: _PyCrossInterpreterData_ReleaseAndRawFree(data);
|
||||
? _PyCrossInterpreterData_ReleaseAndRawFree(data)
|
||||
: _PyCrossInterpreterData_Release(data);
|
||||
if (res < 0) {
|
||||
/* The owning interpreter is already destroyed. */
|
||||
_PyCrossInterpreterData_Clear(NULL, data);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue