MFH: fix #41608 (segfault on a weird code with objects and switch())

This commit is contained in:
Antony Dovgal 2007-06-06 08:35:23 +00:00
parent c38ad55e8e
commit 3790227f9d

View File

@ -366,7 +366,7 @@ static inline void zend_switch_free(zend_op *opline, temp_variable *Ts TSRMLS_DC
* quick & silent get_zval_ptr, and FREE_OP * quick & silent get_zval_ptr, and FREE_OP
*/ */
PZVAL_UNLOCK_FREE(T->str_offset.str); PZVAL_UNLOCK_FREE(T->str_offset.str);
} else { } else if (T(opline->op1.u.var).var.ptr) {
zval_ptr_dtor(&T(opline->op1.u.var).var.ptr); zval_ptr_dtor(&T(opline->op1.u.var).var.ptr);
if (opline->extended_value & ZEND_FE_RESET_VARIABLE) { /* foreach() free */ if (opline->extended_value & ZEND_FE_RESET_VARIABLE) { /* foreach() free */
zval_ptr_dtor(&T(opline->op1.u.var).var.ptr); zval_ptr_dtor(&T(opline->op1.u.var).var.ptr);