]> granicus.if.org Git - php/commitdiff
Fixed memleak in alloc_globals_ctor
authorReeze Xia <reeze@php.net>
Sat, 28 Feb 2015 05:14:39 +0000 (13:14 +0800)
committerReeze Xia <reeze@php.net>
Sat, 28 Feb 2015 05:14:39 +0000 (13:14 +0800)
This free operation is missed when new MM was introduced in master.

Zend/zend_alloc.c

index ad31d63454bc9a4e590c53943294e6d196894c86..70995688e80776eedc999d748007e9860fb3dcd9 100644 (file)
@@ -1950,6 +1950,9 @@ void zend_mm_shutdown(zend_mm_heap *heap, int full, int silent)
 
 #if ZEND_MM_CUSTOM
        if (heap->use_custom_heap) {
+               if (full) {
+                       free(heap);
+               }
                return;
        }
 #endif