diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 5e515aa532c..74ebb354b5a 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; }