diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2011-10-30 19:13:55 +0100 |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2011-10-30 19:13:55 +0100 |
commit | b056c79a98400c94f499fdf3ea36f3d7dbe55d8f (patch) | |
tree | 3c18da46e16657275147c0a5d34202ecaeb8faaf /Python/pystate.c | |
parent | 793bc5109e2c4f606939dccdca3f9a6b5f6cbaa4 (diff) | |
download | cpython-b056c79a98400c94f499fdf3ea36f3d7dbe55d8f.tar.gz |
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 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 } |