]> granicus.if.org Git - php/commitdiff
Fixed ZEND_MM_MEM_TYPE=mmap_zero
authorDmitry Stogov <dmitry@zend.com>
Thu, 26 Dec 2013 07:51:32 +0000 (11:51 +0400)
committerDmitry Stogov <dmitry@zend.com>
Thu, 26 Dec 2013 07:51:32 +0000 (11:51 +0400)
NEWS
Zend/zend_alloc.c

diff --git a/NEWS b/NEWS
index 38659e60767c970d48d8c74e44bb5affc037b630..eecd4e800284a7d0d3e6f0da0cbd1386655cae6e 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,7 @@ PHP                                                                        NEWS
   . Disallowed JMP into a finally block. (Laruence)
   . Added validation of class names in the autoload process. (Dmitry)
   . Fixed invalid C code in zend_strtod.c. (Lior Kaplan)
+  . Fixed ZEND_MM_MEM_TYPE=mmap_zero. (Dmitry, Tony)
   . Fixed bug #66041 (list() fails to unpack yielded ArrayAccess object).
     (Nikita)
   . Fixed bug #65764 (generators/throw_rethrow FAIL with
index bf9d000437731999a4bf49689c53e5df4135e6e4..c3d322aa8f57157cb08ada64bc6a1a3088cc7a8d 100644 (file)
@@ -201,7 +201,7 @@ static int zend_mm_dev_zero_fd = -1;
 
 static zend_mm_storage* zend_mm_mem_mmap_zero_init(void *params)
 {
-       if (zend_mm_dev_zero_fd != -1) {
+       if (zend_mm_dev_zero_fd == -1) {
                zend_mm_dev_zero_fd = open("/dev/zero", O_RDWR, S_IRUSR | S_IWUSR);
        }
        if (zend_mm_dev_zero_fd >= 0) {