summaryrefslogtreecommitdiff
path: root/Zend/zend_execute.c
diff options
context:
space:
mode:
authorAndi Gutmans <andi@php.net>1999-07-10 16:56:56 +0000
committerAndi Gutmans <andi@php.net>1999-07-10 16:56:56 +0000
commitfb7a4b6486b9fb8d99146f965d89df31710783d0 (patch)
treeb107a708dbccd666f810ec2aa5e8ba60ac488705 /Zend/zend_execute.c
parentdc933fc50beab329d028c852f6f87a9d826fcff0 (diff)
downloadphp-git-fb7a4b6486b9fb8d99146f965d89df31710783d0.tar.gz
Fix assignments of reference variables
Diffstat (limited to 'Zend/zend_execute.c')
-rw-r--r--Zend/zend_execute.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c
index fc3a9a8d74..b7cc55b01b 100644
--- a/Zend/zend_execute.c
+++ b/Zend/zend_execute.c
@@ -264,6 +264,7 @@ static inline void zend_assign_to_variable(znode *result, znode *op1, znode *op2
short refcount=variable_ptr->refcount;
previous_lock_count = variable_ptr->EA.locks;
+ value->refcount++;
zendi_zval_dtor(*variable_ptr);
*variable_ptr = *value;
variable_ptr->refcount = refcount;
@@ -271,6 +272,7 @@ static inline void zend_assign_to_variable(znode *result, znode *op1, znode *op2
variable_ptr->EA.locks = previous_lock_count;
if (type!=IS_TMP_VAR) {
zendi_zval_copy_ctor(*variable_ptr);
+ zval_ptr_dtor(&value);
}
}
} else {