summaryrefslogtreecommitdiff
path: root/Python/pystate.c
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2011-10-30 19:14:46 +0100
committerAntoine Pitrou <solipsis@pitrou.net>2011-10-30 19:14:46 +0100
commit6fbbc334407904ee344c2b30d346f870031c0371 (patch)
treebbae13d95cb196904716066a9d35d8f899105a50 /Python/pystate.c
parentc34f5c256a4c528d5d1105deee5eeeac944e4b91 (diff)
parent8db076cf8af4fddfc1e406ec579d559abc53304c (diff)
downloadcpython-git-6fbbc334407904ee344c2b30d346f870031c0371.tar.gz
Issue #10363: Deallocate global locks in Py_Finalize().
Diffstat (limited to 'Python/pystate.c')
-rw-r--r--Python/pystate.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/Python/pystate.c b/Python/pystate.c
index b347c41c54..40699af499 100644
--- a/Python/pystate.c
+++ b/Python/pystate.c
@@ -150,6 +150,12 @@ PyInterpreterState_Delete(PyInterpreterState *interp)
*p = interp->next;
HEAD_UNLOCK();
free(interp);
+#ifdef WITH_THREAD
+ if (interp_head == NULL && head_mutex != NULL) {
+ PyThread_free_lock(head_mutex);
+ head_mutex = NULL;
+ }
+#endif
}