]> granicus.if.org Git - php/commitdiff
Fixed memleak in tests/lang/engine_assignExecutionOrder_001.phpt
authorDmitry Stogov <dmitry@php.net>
Mon, 21 Sep 2009 13:01:17 +0000 (13:01 +0000)
committerDmitry Stogov <dmitry@php.net>
Mon, 21 Sep 2009 13:01:17 +0000 (13:01 +0000)
Zend/zend_vm_def.h
Zend/zend_vm_execute.h

index 72167214ed54cfe224cd1104e85b868e7971b1c1..7420f9fdf82430ff9dc3424a8a59e9aa9c860bbc 100644 (file)
@@ -964,6 +964,7 @@ ZEND_VM_HELPER_EX(zend_fetch_var_address_helper, CONST|TMP|VAR|CV, ANY, int type
                retval = CG(auto_globals_cache)[opline->op2.u.var];
        } else if (opline->op2.u.EA.type == ZEND_FETCH_STATIC_MEMBER) {
                retval = zend_std_get_static_property(EX_T(opline->op2.u.var).class_entry, Z_TYPE_P(varname), Z_UNIVAL_P(varname), Z_UNILEN_P(varname), 0 TSRMLS_CC);
+               FREE_OP1();
        } else {
                zend_auto_global *auto_global = NULL;
 
index 4b86568c4f7423c2ad064a3e1b60392c21df5d38..8b0c651c85c2f34ceb9b7a9d2f6ef289ec742eab 100644 (file)
@@ -1318,6 +1318,7 @@ static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_CONST(int type, ZEND
                retval = CG(auto_globals_cache)[opline->op2.u.var];
        } else if (opline->op2.u.EA.type == ZEND_FETCH_STATIC_MEMBER) {
                retval = zend_std_get_static_property(EX_T(opline->op2.u.var).class_entry, Z_TYPE_P(varname), Z_UNIVAL_P(varname), Z_UNILEN_P(varname), 0 TSRMLS_CC);
+
        } else {
                zend_auto_global *auto_global = NULL;
 
@@ -4752,6 +4753,7 @@ static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_TMP(int type, ZEND_O
                retval = CG(auto_globals_cache)[opline->op2.u.var];
        } else if (opline->op2.u.EA.type == ZEND_FETCH_STATIC_MEMBER) {
                retval = zend_std_get_static_property(EX_T(opline->op2.u.var).class_entry, Z_TYPE_P(varname), Z_UNIVAL_P(varname), Z_UNILEN_P(varname), 0 TSRMLS_CC);
+               zval_dtor(free_op1.var);
        } else {
                zend_auto_global *auto_global = NULL;
 
@@ -8139,6 +8141,7 @@ static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_VAR(int type, ZEND_O
                retval = CG(auto_globals_cache)[opline->op2.u.var];
        } else if (opline->op2.u.EA.type == ZEND_FETCH_STATIC_MEMBER) {
                retval = zend_std_get_static_property(EX_T(opline->op2.u.var).class_entry, Z_TYPE_P(varname), Z_UNIVAL_P(varname), Z_UNILEN_P(varname), 0 TSRMLS_CC);
+               if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
        } else {
                zend_auto_global *auto_global = NULL;
 
@@ -22688,6 +22691,7 @@ static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_CV(int type, ZEND_OP
                retval = CG(auto_globals_cache)[opline->op2.u.var];
        } else if (opline->op2.u.EA.type == ZEND_FETCH_STATIC_MEMBER) {
                retval = zend_std_get_static_property(EX_T(opline->op2.u.var).class_entry, Z_TYPE_P(varname), Z_UNIVAL_P(varname), Z_UNILEN_P(varname), 0 TSRMLS_CC);
+
        } else {
                zend_auto_global *auto_global = NULL;