From 650264e360e7cda8b224283dde55673ed022314d Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Thu, 28 Dec 2017 16:31:09 +0800 Subject: [PATCH] Fixed bug #75742 (potential memleak in internal classes's static members) --- NEWS | 2 ++ Zend/zend_execute_API.c | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 9237ffdbe2f..a330bbaf82a 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,8 @@ PHP NEWS ?? ??? ????, PHP 7.2.2 - Core: + . Fixed bug #75742 (potential memleak in internal classes's static members). + (Laruence) . Fixed bug #75679 (Path 260 character problem). (Anatol) . Fixed bug #75614 (Some non-portable == in shell scripts). (jdolecek) diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index a619b3ccf32..adf5f96c711 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -296,6 +296,8 @@ void shutdown_executor(void) /* {{{ */ break; } } ZEND_HASH_FOREACH_END_DEL(); + + zend_cleanup_internal_classes(); } else { zend_hash_graceful_reverse_destroy(&EG(symbol_table)); @@ -358,6 +360,8 @@ void shutdown_executor(void) /* {{{ */ } ZEND_HASH_FOREACH_END_DEL(); } + zend_cleanup_internal_classes(); + while (EG(symtable_cache_ptr)>=EG(symtable_cache)) { zend_hash_destroy(*EG(symtable_cache_ptr)); FREE_HASHTABLE(*EG(symtable_cache_ptr)); @@ -388,8 +392,6 @@ void shutdown_executor(void) /* {{{ */ EG(ht_iterators_used) = 0; - zend_cleanup_internal_classes(); - zend_shutdown_fpu(); } /* }}} */