diff --git a/usr.bin/tar/write.c b/usr.bin/tar/write.c index 8fe0530539c2..9b3f39bc1c16 100644 --- a/usr.bin/tar/write.c +++ b/usr.bin/tar/write.c @@ -1100,8 +1100,7 @@ lookup_hardlink(struct bsdtar *bsdtar, struct archive_entry *entry, le->previous->next = le->next; if (le->next != NULL) le->next->previous = le->previous; - if (le->name != NULL) - free(le->name); + free(le->name); if (links_cache->buckets[hash] == le) links_cache->buckets[hash] = le->next; links_cache->number_entries--;