Skip to content

Commit 1f4654c

Browse files
committed
Fix arguments cleanup
1 parent 0016ed9 commit 1f4654c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

ext/opcache/jit/zend_jit_ir_ffi.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ static int zend_jit_ffi_do_call(zend_jit_ctx *jit,
507507
case ZEND_FFI_TYPE_BOOL:
508508
jit_set_Z_TYPE_INFO(jit, res_addr,
509509
ir_ADD_U32(ir_ZEXT_U32(ref), ir_CONST_U32(IS_FALSE)));
510-
return 1;
510+
goto cleanup;
511511
case ZEND_FFI_TYPE_CHAR:
512512
jit_set_Z_PTR(jit, res_addr, ir_LOAD_A(
513513
ir_ADD_A(ir_CONST_ADDR(zend_one_char_string),
@@ -518,11 +518,11 @@ static int zend_jit_ffi_do_call(zend_jit_ctx *jit,
518518
if ((ret_type->attr & ZEND_FFI_ATTR_CONST)
519519
&& ZEND_FFI_TYPE(ret_type->pointer.type)->kind == ZEND_FFI_TYPE_CHAR) {
520520
ir_CALL_2(IR_VOID, ir_CONST_FC_FUNC(zend_jit_zval_string), jit_ZVAL_ADDR(jit, res_addr), ref);
521-
return 1;
521+
goto cleanup;
522522
} else {
523523
ir_CALL_3(IR_VOID, ir_CONST_FC_FUNC(zend_jit_zval_ffi_ptr),
524524
jit_ZVAL_ADDR(jit, res_addr), ir_CONST_ADDR(ret_type), ref);
525-
return 1;
525+
goto cleanup;
526526
}
527527
break;
528528
default:
@@ -534,6 +534,7 @@ static int zend_jit_ffi_do_call(zend_jit_ctx *jit,
534534
}
535535
}
536536

537+
cleanup:
537538
if (num_args) {
538539
zend_jit_trace_stack *stack = call->stack;
539540

0 commit comments

Comments
 (0)