]> granicus.if.org Git - php/commitdiff
Fixed double mutex unlock
authorDmitry Stogov <dmitry@zend.com>
Thu, 23 May 2019 08:20:46 +0000 (11:20 +0300)
committerDmitry Stogov <dmitry@zend.com>
Thu, 23 May 2019 08:20:46 +0000 (11:20 +0300)
ext/opcache/ZendAccelerator.c

index 2162718bed30ec288124ef6cd9e9464fb7b23a6a..6fd341eb065ebc4826b5a5ba69cc9c42830aec2c 100644 (file)
@@ -4255,9 +4255,10 @@ static int accel_finish_startup(void)
 
                        orig_report_memleaks = PG(report_memleaks);
                        PG(report_memleaks) = 0;
-                       php_request_shutdown(NULL);
+                       php_request_shutdown(NULL); /* calls zend_shared_alloc_unlock(); */
                        PG(report_memleaks) = orig_report_memleaks;
                } else {
+                       zend_shared_alloc_unlock();
                        ret = FAILURE;
                }
 #ifdef ZEND_SIGNALS
@@ -4274,8 +4275,6 @@ static int accel_finish_startup(void)
                sapi_module.ub_write = orig_ub_write;
                sapi_module.flush = orig_flush;
 
-               zend_shared_alloc_unlock();
-
                sapi_activate();
 
                return ret;