diff --git a/ext/ffi/ffi.c b/ext/ffi/ffi.c index 1b449c92684..61ccdbd27cd 100644 --- a/ext/ffi/ffi.c +++ b/ext/ffi/ffi.c @@ -5757,6 +5757,7 @@ void zend_ffi_make_func_type(zend_ffi_dcl *dcl, HashTable *args, zend_ffi_dcl *n zend_hash_destroy(args); pefree(args, FFI_G(persistent)); } + type->func.args = NULL; _zend_ffi_type_dtor(type); zend_ffi_parser_error("unsupported calling convention line %d", FFI_G(line)); break;