]> granicus.if.org Git - php/commitdiff
Restore original patch for bug #26281.
authorIlia Alshanetsky <iliaa@php.net>
Sat, 29 Nov 2003 17:33:25 +0000 (17:33 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Sat, 29 Nov 2003 17:33:25 +0000 (17:33 +0000)
# Andi if you have a time & interest please see if perhaps a better
# solution can be implemented. Thanks.

Zend/zend_execute.c

index be3ca78e22b4fb136cb92f7e78971ad74f550f1f..b3702ad15c11d8d3c77b5f34ef83142fb1d23d73 100644 (file)
@@ -194,7 +194,11 @@ static inline void zend_switch_free(zend_op *opline, temp_variable *Ts TSRMLS_DC
        switch (opline->op1.op_type) {
                case IS_VAR:
                        if (!T(opline->op1.u.var).var.ptr_ptr) {
-                               zval_ptr_dtor(&T(opline->op1.u.var).var.ptr);
+                               temp_variable *T = &T(opline->op1.u.var);
+                               /* perform the equivalent of equivalent of a
+                                * quick & silent get_zval_ptr, and FREE_OP
+                                */
+                               PZVAL_UNLOCK(T->EA.data.str_offset.str);
                        } else {
                                zval_ptr_dtor(&T(opline->op1.u.var).var.ptr);
                                if (opline->extended_value) { /* foreach() free */