From fb927a784a3098519d2b32aaf6d1d88dd9202a60 Mon Sep 17 00:00:00 2001 From: Rock Lee Date: Mon, 6 Aug 2012 18:08:19 +0800 Subject: [PATCH] Update Zend/zend_alloc.c The origin intention is to set all the elements to NULL? --- Zend/zend_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c index a29350d7bf11..aec67133d325 100644 --- a/Zend/zend_alloc.c +++ b/Zend/zend_alloc.c @@ -894,7 +894,7 @@ static inline void zend_mm_init(zend_mm_heap *heap) heap->large_free_bitmap = 0; #if ZEND_MM_CACHE heap->cached = 0; - memset(heap->cache, 0, sizeof(heap->cache)); + memset(heap->cache, 0, sizeof(heap->cache) * ZEND_MM_NUM_BUCKETS); #endif #if ZEND_MM_CACHE_STAT for (i = 0; i < ZEND_MM_NUM_BUCKETS; i++) {