Fixed memleak

This commit is contained in:
Xinchen Hui 2015-03-11 13:42:39 +08:00
parent 75c0f63739
commit 37901aa467
2 changed files with 16 additions and 0 deletions

View File

@ -3241,6 +3241,14 @@ ZEND_VM_HANDLER(60, ZEND_DO_FCALL, ANY, ANY)
EG(current_execute_data) = call->prev_execute_data;
} else {
zend_error(E_EXCEPTION | E_ERROR, "Cannot call overloaded function for non-object");
zend_vm_stack_free_args(call);
zend_vm_stack_free_call_frame(call);
if (fbc->type == ZEND_OVERLOADED_FUNCTION_TEMPORARY) {
zend_string_release(fbc->common.function_name);
}
efree(fbc);
HANDLE_EXCEPTION();
}

View File

@ -807,6 +807,14 @@ static int ZEND_FASTCALL ZEND_DO_FCALL_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
EG(current_execute_data) = call->prev_execute_data;
} else {
zend_error(E_EXCEPTION | E_ERROR, "Cannot call overloaded function for non-object");
zend_vm_stack_free_args(call);
zend_vm_stack_free_call_frame(call);
if (fbc->type == ZEND_OVERLOADED_FUNCTION_TEMPORARY) {
zend_string_release(fbc->common.function_name);
}
efree(fbc);
HANDLE_EXCEPTION();
}