[php-src] PR #23479: Fix GH-23477: Memory leak on duplicate native Phar manifest entries
| From: | LamentXU123 | Date: | Thu, 27 Aug 2026 08:59:21 +0000 |
| Subject: | [php-src] PR #23479: Fix GH-23477: Memory leak on duplicate native Phar manifest entries | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-38165@lists.php.net to get a copy of this message | ||
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.