From 7fba7209e1d8409aaea236527125999b8f480785 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Fri, 3 Nov 2017 21:02:27 +0300 Subject: [PATCH] Fixed memory leak (Zend/tests/list_003.phpt) --- Zend/zend_compile.c | 4 ++++ 1 file changed, 4 insertions(+) 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; -- 2.40.0