mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02: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:
commit
f3d60a166d
1 changed files with 1 additions and 0 deletions
|
@ -276,6 +276,7 @@ ZEND_API int zend_register_list_destructors_ex(rsrc_dtor_func_t ld, rsrc_dtor_fu
|
||||||
ZVAL_PTR(&zv, lde);
|
ZVAL_PTR(&zv, lde);
|
||||||
|
|
||||||
if (zend_hash_next_index_insert(&list_destructors, &zv) == NULL) {
|
if (zend_hash_next_index_insert(&list_destructors, &zv) == NULL) {
|
||||||
|
free(lde);
|
||||||
return FAILURE;
|
return FAILURE;
|
||||||
}
|
}
|
||||||
return list_destructors.nNextFreeElement-1;
|
return list_destructors.nNextFreeElement-1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue