bpo-36333: Fix leak _PyRuntimeState_Fini (GH-12400)
This commit is contained in:
parent
e130a07eb2
commit
943395fab9
|
@ -0,0 +1 @@
|
|||
Fix leak in _PyRuntimeState_Fini. Contributed by Stéphane Wirtel.
|
|
@ -92,6 +92,11 @@ _PyRuntimeState_Fini(_PyRuntimeState *runtime)
|
|||
runtime->interpreters.mutex = NULL;
|
||||
}
|
||||
|
||||
if (runtime->xidregistry.mutex != NULL) {
|
||||
PyThread_free_lock(runtime->xidregistry.mutex);
|
||||
runtime->xidregistry.mutex = NULL;
|
||||
}
|
||||
|
||||
PyMem_SetAllocator(PYMEM_DOMAIN_RAW, &old_alloc);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue