From: Andi Gutmans Date: Thu, 26 Aug 1999 07:26:15 +0000 (+0000) Subject: - Fix leak when global is used in the global scope. X-Git-Tag: PRE_DELAYED_ARRAY_FETCH_PATCH~303 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2c88f2950cb67c204e417881cb84ee5e4d23d190;p=php - Fix leak when global is used in the global scope. --- diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index 058c8c338b..6eacb7419f 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -470,7 +470,8 @@ ZEND_API inline void zend_assign_to_variable_reference(znode *result, zval **var value_ptr = *value_ptr_ptr; if (variable_ptr == EG(error_zval_ptr) || value_ptr==EG(error_zval_ptr)) { variable_ptr_ptr = &EG(uninitialized_zval_ptr); - } else if (variable_ptr==&EG(uninitialized_zval) || variable_ptr!=value_ptr) { +// } else if (variable_ptr==&EG(uninitialized_zval) || variable_ptr!=value_ptr) { + } else if (variable_ptr != value_ptr) { variable_ptr->refcount--; if (variable_ptr->refcount==0) { zendi_zval_dtor(*variable_ptr);