mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2: Fix memory leak in error path of zend_register_list_destructors_ex
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user