From: Shane Caraveo Date: Mon, 8 Jan 2001 00:32:18 +0000 (+0000) Subject: be sure to unlock that mutex before returning! X-Git-Tag: php-4.0.5RC1~682 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=65eac44f699c91ca4a09c126c58e581012a33235;p=php be sure to unlock that mutex before returning! --- diff --git a/TSRM/TSRM.c b/TSRM/TSRM.c index 0edba20248..7914c72943 100644 --- a/TSRM/TSRM.c +++ b/TSRM/TSRM.c @@ -249,6 +249,7 @@ TSRM_API void *ts_resource_ex(ts_rsrc_id id, THREAD_T *th_id) if (!thread_resources) { allocate_new_resource(&tsrm_tls_table[hash_value], thread_id); + tsrm_mutex_unlock(tsmm_mutex); return ts_resource(id); /* thread_resources = tsrm_tls_table[hash_value]; */ } else { @@ -260,6 +261,7 @@ TSRM_API void *ts_resource_ex(ts_rsrc_id id, THREAD_T *th_id) thread_resources = thread_resources->next; } else { allocate_new_resource(&thread_resources->next, thread_id); + tsrm_mutex_unlock(tsmm_mutex); return ts_resource(id); /* * thread_resources = thread_resources->next;