From: Zeev Suraski Date: Sat, 29 May 1999 11:01:50 +0000 (+0000) Subject: Fix a leak X-Git-Tag: BEFORE_REMOVING_GC_STEP1~249 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=24a21ca2e15ac41d907e825f7c5eb652ac50e95d;p=php Fix a leak --- 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) {