From 6d999b4379e9b7b4052534a068809d1297bb738d Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Mon, 18 Feb 2013 11:12:20 +0400 Subject: [PATCH] Added check for CreateMutex() failure --- shared_alloc_win32.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/shared_alloc_win32.c b/shared_alloc_win32.c index 32b7c3a845e..fad75be77de 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); }