From: Stanislav Malyshev Date: Wed, 2 Jun 2004 12:48:19 +0000 (+0000) Subject: fix incdec - make value's refcount non-zero when passing to X-Git-Tag: php-5.0.0RC3RC2~6 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=176f6d8e6e37880dd1f2e389364446087f56813c;p=php fix incdec - make value's refcount non-zero when passing to write_property - otherwise __set caller cleanup could kill it. --- diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index fc77357f6b..195131ceda 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -1275,11 +1275,9 @@ static void zend_post_incdec_property(znode *result, znode *op1, znode *op2, tem *retval = *z; zendi_zval_copy_ctor(*retval); incdec_op(z); + z->refcount++; Z_OBJ_HT_P(object)->write_property(object, property, z TSRMLS_CC); - if (z->refcount == 0) { - zval_dtor(z); - FREE_ZVAL(z); - } + zval_ptr_dtor(&z); } FREE_OP(Ts, op2, EG(free_op2));