summaryrefslogtreecommitdiff
path: root/Zend/zend_alloc.c
diff options
context:
space:
mode:
authorAndi Gutmans <andi@php.net>2002-06-22 16:09:15 +0000
committerAndi Gutmans <andi@php.net>2002-06-22 16:09:15 +0000
commit7f226a6b199f8df969f0f46def6a26dbd4a75265 (patch)
tree1ceb8f8497002f114516c7ec473c37bd92e77388 /Zend/zend_alloc.c
parent58ce28e58893b8846e2f0c1a53020dcf877e6b8b (diff)
downloadphp-git-7f226a6b199f8df969f0f46def6a26dbd4a75265.tar.gz
- Fix crash when zend_mm_shutdown is called more than once.
Diffstat (limited to 'Zend/zend_alloc.c')
-rw-r--r--Zend/zend_alloc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c
index 8dbc4a1462..46831ef314 100644
--- a/Zend/zend_alloc.c
+++ b/Zend/zend_alloc.c
@@ -451,8 +451,10 @@ ZEND_API void shutdown_memory_manager(int silent, int clean_cache TSRMLS_DC)
zend_fast_cache_list_entry *fast_cache_list_entry, *next_fast_cache_list_entry;
#ifdef ZEND_MM
- zend_mm_shutdown(&AG(mm_heap));
- return;
+ if (clean_cache) {
+ zend_mm_shutdown(&AG(mm_heap));
+ return;
+ }
#elif defined(ZEND_WIN32) && !ZEND_DEBUG
if (clean_cache && AG(memory_heap)) {
HeapDestroy(AG(memory_heap));