Commit 56b8d1040d8 for php.net
commit 56b8d1040d83a4731e7b286b890cffef559de87b
Author: Ilija Tovilo <ilija.tovilo@me.com>
Date: Tue Jul 28 12:04:27 2026 +0200
Fix string freeing in phar_follow_one_link()
Faulty merge on my part.
diff --git a/ext/phar/util.c b/ext/phar/util.c
index 37373c26bfa..b93bf6940de 100644
--- a/ext/phar/util.c
+++ b/ext/phar/util.c
@@ -71,15 +71,11 @@ static phar_entry_info *phar_follow_one_link(phar_entry_info *entry)
link = phar_get_link_location(entry);
if (NULL != (link_entry = zend_hash_find_ptr(&(entry->phar->manifest), entry->symlink)) ||
NULL != (link_entry = zend_hash_find_ptr(&(entry->phar->manifest), link))) {
- if (link != entry->symlink) {
- efree(link);
- }
+ zend_string_release(link);
return link_entry;
}
- if (link != entry->symlink) {
- efree(link);
- }
+ zend_string_release(link);
return NULL;
}