]> granicus.if.org Git - php/commitdiff
Fix the lock (the other patch would probably also work, but it's more error
authorZeev Suraski <zeev@php.net>
Sun, 20 Mar 2005 09:03:07 +0000 (09:03 +0000)
committerZeev Suraski <zeev@php.net>
Sun, 20 Mar 2005 09:03:07 +0000 (09:03 +0000)
prone and it's better to be on the safe side)

TSRM/TSRM.c

index 2fbf796ef666c2db529ddef240d977be09692922..e9ae95d8efa0d1618a04d7d159c2db106b7bced9 100644 (file)
@@ -296,11 +296,11 @@ static void allocate_new_resource(tsrm_tls_entry **thread_resources_ptr, THREAD_
                }
        }
 
-       tsrm_mutex_unlock(tsmm_mutex);
-
        if (tsrm_new_thread_end_handler) {
                tsrm_new_thread_end_handler(thread_id, &((*thread_resources_ptr)->storage));
        }
+
+       tsrm_mutex_unlock(tsmm_mutex);
 }