From: Antony Dovgal Date: Wed, 6 Jun 2007 08:35:23 +0000 (+0000) Subject: MFH: fix #41608 (segfault on a weird code with objects and switch()) X-Git-Tag: php-5.2.4RC1~415 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3790227f9d36dcaf79405b53df16131e757fb18b;p=php MFH: fix #41608 (segfault on a weird code with objects and switch()) --- diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index dd0faeb131..7c75aad719 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -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 */ 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); if (opline->extended_value & ZEND_FE_RESET_VARIABLE) { /* foreach() free */ zval_ptr_dtor(&T(opline->op1.u.var).var.ptr);