From: Dmitry Stogov Date: Fri, 3 Nov 2017 18:02:27 +0000 (+0300) Subject: Fixed memory leak (Zend/tests/list_003.phpt) X-Git-Tag: php-7.3.0alpha1~1088 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7fba7209e1d8409aaea236527125999b8f480785;p=php Fixed memory leak (Zend/tests/list_003.phpt) --- diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index a5dd15f256..85d5abb965 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -2821,6 +2821,10 @@ static void zend_compile_list_assign( zend_bool is_keyed = list->children > 0 && list->child[0] != NULL && list->child[0]->child[1] != NULL; + if (list->children && expr_node->op_type == IS_CONST && Z_TYPE(expr_node->u.constant) == IS_STRING) { + zval_make_interned_string(&expr_node->u.constant); + } + for (i = 0; i < list->children; ++i) { zend_ast *elem_ast = list->child[i]; zend_ast *var_ast, *key_ast;