From: Felipe Pena Date: Thu, 4 Dec 2008 15:50:48 +0000 (+0000) Subject: - Fixed bug #46749 (Crash when repeatedly attempting to assign to property of non... X-Git-Tag: BEFORE_HEAD_NS_CHANGES_MERGE~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1b893ea4bcd2498485eaa8577f8b6fb03416ea20;p=php - Fixed bug #46749 (Crash when repeatedly attempting to assign to property of non-object) --- diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 5e515aa532..74ebb354b5 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -598,11 +598,6 @@ static inline void zend_assign_to_object(znode *result, zval **object_ptr, zval *retval = EG(uninitialized_zval_ptr); PZVAL_LOCK(*retval); } - if (value_op->op_type == IS_TMP_VAR) { - FREE_ZVAL(value); - } else if (value_op->op_type == IS_CONST) { - zval_ptr_dtor(&value); - } FREE_OP(free_value); return; } @@ -638,6 +633,11 @@ static inline void zend_assign_to_object(znode *result, zval **object_ptr, zval *retval = EG(uninitialized_zval_ptr); PZVAL_LOCK(*retval); } + if (value_op->op_type == IS_TMP_VAR) { + FREE_ZVAL(value); + } else if (value_op->op_type == IS_CONST) { + zval_ptr_dtor(&value); + } FREE_OP(free_value); return; }