From 943395fab925a11ea90d078e771cdfc4443e8c34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Wirtel?= Date: Tue, 19 Mar 2019 11:51:32 +0100 Subject: bpo-36333: Fix leak _PyRuntimeState_Fini (GH-12400) --- Python/pystate.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Python') diff --git a/Python/pystate.c b/Python/pystate.c index 6a2dc102ec..36566b7671 100644 --- a/Python/pystate.c +++ b/Python/pystate.c @@ -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); } -- cgit v1.2.1