Skip to content

Commit 56b8d10

Browse files
committed
Fix string freeing in phar_follow_one_link()
Faulty merge on my part.
1 parent fb21752 commit 56b8d10

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

ext/phar/util.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,11 @@ static phar_entry_info *phar_follow_one_link(phar_entry_info *entry)
7171
link = phar_get_link_location(entry);
7272
if (NULL != (link_entry = zend_hash_find_ptr(&(entry->phar->manifest), entry->symlink)) ||
7373
NULL != (link_entry = zend_hash_find_ptr(&(entry->phar->manifest), link))) {
74-
if (link != entry->symlink) {
75-
efree(link);
76-
}
74+
zend_string_release(link);
7775
return link_entry;
7876
}
7977

80-
if (link != entry->symlink) {
81-
efree(link);
82-
}
78+
zend_string_release(link);
8379
return NULL;
8480
}
8581

0 commit comments

Comments
 (0)