com php-src: Added check for CreateMutex() failure: shared_alloc_win32.c
| From: | Dmitry Stogov | Date: | Mon, 18 Feb 2013 07:12:20 +0000 |
| Subject: | com php-src: Added check for CreateMutex() failure: shared_alloc_win32.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-71533@lists.php.net to get a copy of this message | ||
Commit: 6d999b4379e9b7b4052534a068809d1297bb738d
Author: Dmitry Stogov <dmitry@zend.com> Mon, 18 Feb 2013 11:12:20 +0400
Parents: 908fc9dcc46118f22c9ee840909f19dab98b0556
Branches: PHP-5.5 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=6d999b4379e9b7b4052534a068809d1297bb738d
Log:
Added check for CreateMutex() failure
Changed paths:
M shared_alloc_win32.c
Diff:
diff --git a/shared_alloc_win32.c b/shared_alloc_win32.c
index 32b7c3a..fad75be 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);
}