[GIT-PULLS] [php-src] PR #23479: Fix GH-23477: Memory leak on duplicate native Phar manifest entries

[email protected] (LamentXU123)
Newsgroups php.git-pulls
Message-ID <[email protected]>
Pull Request: https://github.com/php/php-src/pull/23479
Author: LamentXU123

When a native Phar manifest contains duplicate filenames,`zend_hash_add_mem()` fails to insert the duplicate entry and does not take ownership of its allocated filename and metadata. And cause the memory leak since it can't be freed.

The fix is quite simple tho. Check the insertion result and release these allocations on failure.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.