com php-src: don't keep locked mutex after errors: ext/opcache/ZendAccelerator.c

From: Date: Thu, 24 Sep 2015 14:34:44 +0000
Subject: com php-src: don't keep locked mutex after errors: ext/opcache/ZendAccelerator.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-89162@lists.php.net to get a copy of this message
Commit: 0fd7acd11d4a8cdb6afafabd9eb7eef8385cd067 Author: Anatol Belski <ab@php.net> Thu, 24 Sep 2015 14:41:08 +0200 Parents: df832c966ce5c09a1c7dd557ebfb80f1dc181f4f Branches: PHP-7.0 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=0fd7acd11d4a8cdb6afafabd9eb7eef8385cd067 Log: don't keep locked mutex after errors Changed paths: M ext/opcache/ZendAccelerator.c Diff: diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index c09b08d..3fa015e 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -2366,6 +2366,7 @@ static int zend_accel_init_shm(void) accel_shared_globals = zend_shared_alloc(sizeof(zend_accel_shared_globals)); if (!accel_shared_globals) { zend_accel_error(ACCEL_LOG_FATAL, "Insufficient shared memory!"); + zend_shared_alloc_unlock(); return FAILURE; } ZSMMG(app_shared_globals) = accel_shared_globals; @@ -2383,6 +2384,7 @@ static int zend_accel_init_shm(void) ZCSG(interned_strings_start) = zend_shared_alloc((ZCG(accel_directives).interned_strings_buffer * 1024 * 1024)); if (!data || !ZCSG(interned_strings_start)) { zend_accel_error(ACCEL_LOG_FATAL, ACCELERATOR_PRODUCT_NAME " cannot allocate buffer for interned strings"); + zend_shared_alloc_unlock(); return FAILURE; } HT_SET_DATA_ADDR(&ZCSG(interned_strings), data);

« previous php.cvs (#89162) next »