summaryrefslogtreecommitdiff
path: root/Zend/zend_compile.c
diff options
context:
space:
mode:
authorZeev Suraski <zeev@php.net>1999-06-22 19:05:40 +0000
committerZeev Suraski <zeev@php.net>1999-06-22 19:05:40 +0000
commit3eac45ea80288498cd3e33eb4bba91181bd6a0c6 (patch)
tree2afc646b6cf866c077836f698eb8788bfa6e2d55 /Zend/zend_compile.c
parent31c8ec4c8087c9af9ce55ed4aeecb72a52b477db (diff)
downloadphp-git-3eac45ea80288498cd3e33eb4bba91181bd6a0c6.tar.gz
* Fix concatenation of arrays (it was PHP 3.0 style, copying zval's instead
of zval *, and it wasn't using reference counting) * Fix a memory leak in static array()'s with textual indices
Diffstat (limited to 'Zend/zend_compile.c')
-rw-r--r--Zend/zend_compile.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index ec43dcdbdc..48601ca70f 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -1429,6 +1429,7 @@ void do_add_static_array_element(znode *result, znode *offset, znode *expr)
switch (offset->u.constant.type) {
case IS_STRING:
zend_hash_update(result->u.constant.value.ht, offset->u.constant.value.str.val, offset->u.constant.value.str.len+1, &element, sizeof(zval *), NULL);
+ zval_dtor(&offset->u.constant);
break;
case IS_LONG:
zend_hash_index_update(result->u.constant.value.ht, offset->u.constant.value.lval, &element, sizeof(zval *), NULL);