mirror of
https://github.com/php/php-src.git
synced 2024-11-23 01:44:06 +08:00
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:
commit
1ca574f84a
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user