summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZeev Suraski <zeev@php.net>1999-05-29 11:01:50 +0000
committerZeev Suraski <zeev@php.net>1999-05-29 11:01:50 +0000
commit24a21ca2e15ac41d907e825f7c5eb652ac50e95d (patch)
tree7ad6f8a9469166735aaffa009e1f2837b14a4234
parentc1dc4efc3b2dc729a5a14c777f8201e83107234a (diff)
downloadphp-git-24a21ca2e15ac41d907e825f7c5eb652ac50e95d.tar.gz
Fix a leak
-rw-r--r--Zend/zend_execute.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c
index f2623b4410..2eb15542bd 100644
--- a/Zend/zend_execute.c
+++ b/Zend/zend_execute.c
@@ -272,7 +272,9 @@ static inline void zend_assign_to_variable(znode *result, znode *op1, zval *valu
}
}
} else {
- variable_ptr->refcount--;
+ if (--variable_ptr->refcount==0) {
+ zval_dtor(variable_ptr);
+ }
variable_ptr = *variable_ptr_ptr;
if (variable_ptr->refcount==0) {
switch (type) {