commit | 8db076cf8af4fddfc1e406ec579d559abc53304c | [log] [tgz] |
---|---|---|
author | Antoine Pitrou <solipsis@pitrou.net> | Sun Oct 30 19:13:55 2011 +0100 |
committer | Antoine Pitrou <solipsis@pitrou.net> | Sun Oct 30 19:13:55 2011 +0100 |
tree | 49e1c81f070cd90950584156e08fd84cdcdd8d18 | |
parent | e0aa8037149c24f9fe8c37c2e129eb904723a3a6 [diff] [blame] |
Issue #10363: Deallocate global locks in Py_Finalize().
diff --git a/Python/pystate.c b/Python/pystate.c index b347c41..40699af 100644 --- a/Python/pystate.c +++ b/Python/pystate.c
@@ -150,6 +150,12 @@ *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 }