summaryrefslogtreecommitdiff
path: root/Zend/zend_execute.c
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2007-06-06 08:35:23 +0000
committerAntony Dovgal <tony2001@php.net>2007-06-06 08:35:23 +0000
commit3790227f9d36dcaf79405b53df16131e757fb18b (patch)
tree3778d0632234c6ad603f9f01acbf8094f9f3f38f /Zend/zend_execute.c
parentc38ad55e8e3c6fe3fc858bf4d10e768f68bdbd5b (diff)
downloadphp-git-3790227f9d36dcaf79405b53df16131e757fb18b.tar.gz
MFH: fix #41608 (segfault on a weird code with objects and switch())
Diffstat (limited to 'Zend/zend_execute.c')
-rw-r--r--Zend/zend_execute.c2
1 files changed, 1 insertions, 1 deletions
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);