From: Dmitry Stogov Date: Mon, 18 Feb 2013 07:12:20 +0000 (+0400) Subject: Added check for CreateMutex() failure X-Git-Tag: php-5.5.0beta1~42^2~63 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6d999b4379e9b7b4052534a068809d1297bb738d;p=php Added check for CreateMutex() failure --- diff --git a/shared_alloc_win32.c b/shared_alloc_win32.c index 32b7c3a845..fad75be77d 100644 --- a/shared_alloc_win32.c +++ b/shared_alloc_win32.c @@ -102,6 +102,10 @@ static char *get_mmap_base_file() void zend_shared_alloc_create_lock(void) { memory_mutex = CreateMutex(NULL, FALSE, create_name_with_username(ACCEL_MUTEX_NAME)); + if (!memory_mutex) { + zend_accel_error(ACCEL_LOG_FATAL, "Cannot create mutex"); + return; + } ReleaseMutex(memory_mutex); }