mirror of
https://github.com/php/php-src.git
synced 2024-11-24 02:15:04 +08:00
be sure to unlock that mutex before returning!
This commit is contained in:
parent
0a1d3aa108
commit
65eac44f69
@ -249,6 +249,7 @@ TSRM_API void *ts_resource_ex(ts_rsrc_id id, THREAD_T *th_id)
|
|||||||
|
|
||||||
if (!thread_resources) {
|
if (!thread_resources) {
|
||||||
allocate_new_resource(&tsrm_tls_table[hash_value], thread_id);
|
allocate_new_resource(&tsrm_tls_table[hash_value], thread_id);
|
||||||
|
tsrm_mutex_unlock(tsmm_mutex);
|
||||||
return ts_resource(id);
|
return ts_resource(id);
|
||||||
/* thread_resources = tsrm_tls_table[hash_value]; */
|
/* thread_resources = tsrm_tls_table[hash_value]; */
|
||||||
} else {
|
} else {
|
||||||
@ -260,6 +261,7 @@ TSRM_API void *ts_resource_ex(ts_rsrc_id id, THREAD_T *th_id)
|
|||||||
thread_resources = thread_resources->next;
|
thread_resources = thread_resources->next;
|
||||||
} else {
|
} else {
|
||||||
allocate_new_resource(&thread_resources->next, thread_id);
|
allocate_new_resource(&thread_resources->next, thread_id);
|
||||||
|
tsrm_mutex_unlock(tsmm_mutex);
|
||||||
return ts_resource(id);
|
return ts_resource(id);
|
||||||
/*
|
/*
|
||||||
* thread_resources = thread_resources->next;
|
* thread_resources = thread_resources->next;
|
||||||
|
Loading…
Reference in New Issue
Block a user