ZEND_API int zend_execute_scripts(int type, zval *retval, int file_count, ...);
ZEND_API int open_file_for_scanning(zend_file_handle *file_handle);
ZEND_API void init_op_array(zend_op_array *op_array, zend_uchar type, int initial_ops_size);
-ZEND_API void destroy_op_array(zend_op_array *op_array);
+ZEND_API zend_bool destroy_op_array(zend_op_array *op_array);
ZEND_API void zend_destroy_file_handle(zend_file_handle *file_handle);
ZEND_API void zend_cleanup_user_class_data(zend_class_entry *ce);
ZEND_API void zend_cleanup_internal_class_data(zend_class_entry *ce);
ZEND_VM_LEAVE();
} else if (ZEND_CALL_KIND_EX(call_info) == ZEND_CALL_NESTED_CODE) {
zend_detach_symbol_table(execute_data);
- destroy_op_array(&EX(func)->op_array);
- efree_size(EX(func), sizeof(zend_op_array));
+ if (EXPECTED(destroy_op_array(&EX(func)->op_array) != 0)) {
+ efree_size(EX(func), sizeof(zend_op_array));
+ }
old_execute_data = execute_data;
execute_data = EG(current_execute_data) = EX(prev_execute_data);
zend_vm_stack_free_call_frame_ex(call_info, old_execute_data);
}
call->prev_execute_data = execute_data;
- i_init_code_execute_data(call, new_op_array, return_value);
+ i_init_code_execute_data(call, new_op_array, return_value);
if (EXPECTED(zend_execute_ex == execute_ex)) {
ZEND_VM_ENTER();
} else {
zend_vm_stack_free_call_frame(call);
}
- destroy_op_array(new_op_array);
- efree_size(new_op_array, sizeof(zend_op_array));
+ if (EXPECTED(destroy_op_array(new_op_array) != 0)) {
+ efree_size(new_op_array, sizeof(zend_op_array));
+ }
if (UNEXPECTED(EG(exception) != NULL)) {
zend_throw_exception_internal(NULL);
HANDLE_EXCEPTION();
ZEND_VM_LEAVE();
} else if (ZEND_CALL_KIND_EX(call_info) == ZEND_CALL_NESTED_CODE) {
zend_detach_symbol_table(execute_data);
- destroy_op_array(&EX(func)->op_array);
- efree_size(EX(func), sizeof(zend_op_array));
+ if (EXPECTED(destroy_op_array(&EX(func)->op_array) != 0)) {
+ efree_size(EX(func), sizeof(zend_op_array));
+ }
old_execute_data = execute_data;
execute_data = EG(current_execute_data) = EX(prev_execute_data);
zend_vm_stack_free_call_frame_ex(call_info, old_execute_data);
}
call->prev_execute_data = execute_data;
- i_init_code_execute_data(call, new_op_array, return_value);
+ i_init_code_execute_data(call, new_op_array, return_value);
if (EXPECTED(zend_execute_ex == execute_ex)) {
ZEND_VM_ENTER();
} else {
zend_vm_stack_free_call_frame(call);
}
- destroy_op_array(new_op_array);
- efree_size(new_op_array, sizeof(zend_op_array));
+ if (EXPECTED(destroy_op_array(new_op_array) != 0)) {
+ efree_size(new_op_array, sizeof(zend_op_array));
+ }
if (UNEXPECTED(EG(exception) != NULL)) {
zend_throw_exception_internal(NULL);
HANDLE_EXCEPTION();
}
call->prev_execute_data = execute_data;
- i_init_code_execute_data(call, new_op_array, return_value);
+ i_init_code_execute_data(call, new_op_array, return_value);
if (EXPECTED(zend_execute_ex == execute_ex)) {
ZEND_VM_ENTER();
} else {
zend_vm_stack_free_call_frame(call);
}
- destroy_op_array(new_op_array);
- efree_size(new_op_array, sizeof(zend_op_array));
+ if (EXPECTED(destroy_op_array(new_op_array) != 0)) {
+ efree_size(new_op_array, sizeof(zend_op_array));
+ }
if (UNEXPECTED(EG(exception) != NULL)) {
zend_throw_exception_internal(NULL);
HANDLE_EXCEPTION();
}
call->prev_execute_data = execute_data;
- i_init_code_execute_data(call, new_op_array, return_value);
+ i_init_code_execute_data(call, new_op_array, return_value);
if (EXPECTED(zend_execute_ex == execute_ex)) {
ZEND_VM_ENTER();
} else {
zend_vm_stack_free_call_frame(call);
}
- destroy_op_array(new_op_array);
- efree_size(new_op_array, sizeof(zend_op_array));
+ if (EXPECTED(destroy_op_array(new_op_array) != 0)) {
+ efree_size(new_op_array, sizeof(zend_op_array));
+ }
if (UNEXPECTED(EG(exception) != NULL)) {
zend_throw_exception_internal(NULL);
HANDLE_EXCEPTION();