Merge branch 'PHP-8.4'

* PHP-8.4:
  Fix memory leak on ZEND_FFI_TYPE_CHAR conversion failure
This commit is contained in:
Niels Dossche 2024-12-23 14:23:16 +01:00
commit 4e9cde758e
No known key found for this signature in database
GPG key ID: B8A8AD166DF0E2E5

View file

@ -808,6 +808,7 @@ again:
if (ZSTR_LEN(str) == 1) { if (ZSTR_LEN(str) == 1) {
*(char*)ptr = ZSTR_VAL(str)[0]; *(char*)ptr = ZSTR_VAL(str)[0];
} else { } else {
zend_tmp_string_release(tmp_str);
zend_ffi_assign_incompatible(value, type); zend_ffi_assign_incompatible(value, type);
return FAILURE; return FAILURE;
} }