Merge branch 'PHP-8.1' into PHP-8.2

* PHP-8.1:
  Fix memory leak in error path of zend_register_list_destructors_ex
This commit is contained in:
Niels Dossche 2023-10-29 21:47:23 +01:00
commit 1ca574f84a

View File

@ -276,6 +276,7 @@ ZEND_API int zend_register_list_destructors_ex(rsrc_dtor_func_t ld, rsrc_dtor_fu
ZVAL_PTR(&zv, lde);
if (zend_hash_next_index_insert(&list_destructors, &zv) == NULL) {
free(lde);
return FAILURE;
}
return list_destructors.nNextFreeElement-1;