Skip to content

Commit fe14c4c

Browse files
committed
Try a possible fix
1 parent 68584b5 commit fe14c4c

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

ext/ffi/ffi.c

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3709,18 +3709,14 @@ ZEND_METHOD(FFI, new) /* {{{ */
37093709
is_const = 1;
37103710
}
37113711

3712-
if (Z_TYPE(EX(This)) != IS_OBJECT) {
3713-
if (FFI_G(tags)) {
3714-
zend_ffi_tags_cleanup(&dcl);
3715-
}
3716-
if (FFI_G(symbols)) {
3717-
zend_hash_destroy(FFI_G(symbols));
3718-
efree(FFI_G(symbols));
3719-
FFI_G(symbols) = NULL;
3720-
}
3712+
if (FFI_G(tags)) {
3713+
zend_ffi_tags_cleanup(&dcl);
3714+
}
3715+
if (FFI_G(symbols)) {
3716+
zend_hash_destroy(FFI_G(symbols));
3717+
efree(FFI_G(symbols));
3718+
FFI_G(symbols) = NULL;
37213719
}
3722-
FFI_G(symbols) = NULL;
3723-
FFI_G(tags) = NULL;
37243720

37253721
type_ptr = dcl.type;
37263722
} else {

0 commit comments

Comments
 (0)