From: Dmitry Stogov Date: Mon, 20 Sep 2010 12:12:42 +0000 (+0000) Subject: Fixed bug #52888 (Zend MM shutdown crash) X-Git-Tag: php-5.4.0alpha1~191^2~915 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c2a92f3d27d2bcd135671582fa3c98741ba5a500;p=php Fixed bug #52888 (Zend MM shutdown crash) --- diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c index a7983b7126..d89cd247a9 100644 --- a/Zend/zend_alloc.c +++ b/Zend/zend_alloc.c @@ -1649,6 +1649,7 @@ ZEND_API void zend_mm_shutdown(zend_mm_heap *heap, int full_shutdown, int silent } } else { if (segment) { +#ifndef ZEND_WIN32 if (heap->reserve_size) { while (segment->next_segment) { prev = segment; @@ -1657,13 +1658,16 @@ ZEND_API void zend_mm_shutdown(zend_mm_heap *heap, int full_shutdown, int silent } heap->segments_list = segment; } else { +#endif do { prev = segment; segment = segment->next_segment; ZEND_MM_STORAGE_FREE(prev); } while (segment); heap->segments_list = NULL; +#ifndef ZEND_WIN32 } +#endif } if (heap->compact_size && heap->real_peak > heap->compact_size) {