diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2011-10-30 18:13:55 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2011-10-30 18:13:55 (GMT) |
commit | 8db076cf8af4fddfc1e406ec579d559abc53304c (patch) | |
tree | 49e1c81f070cd90950584156e08fd84cdcdd8d18 /Python/pystate.c | |
parent | e0aa8037149c24f9fe8c37c2e129eb904723a3a6 (diff) | |
download | cpython-8db076cf8af4fddfc1e406ec579d559abc53304c.zip cpython-8db076cf8af4fddfc1e406ec579d559abc53304c.tar.gz cpython-8db076cf8af4fddfc1e406ec579d559abc53304c.tar.bz2 |
Issue #10363: Deallocate global locks in Py_Finalize().
Diffstat (limited to 'Python/pystate.c')
-rw-r--r-- | Python/pystate.c | 6 |
1 files changed, 6 insertions, 0 deletions
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 @@ 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 } |