From: Dmitry Stogov Date: Mon, 21 Sep 2009 13:01:17 +0000 (+0000) Subject: Fixed memleak in tests/lang/engine_assignExecutionOrder_001.phpt X-Git-Tag: php-5.4.0alpha1~191^2~2628 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=85f7a0da6118774c173d772b3db0f460a87ce0ae;p=php Fixed memleak in tests/lang/engine_assignExecutionOrder_001.phpt --- diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index 72167214ed..7420f9fdf8 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -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; diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index 4b86568c4f..8b0c651c85 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -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;