diff options
| author | Tim Kientzle <kientzle@FreeBSD.org> | 2004-04-13 23:50:48 +0000 |
|---|---|---|
| committer | Tim Kientzle <kientzle@FreeBSD.org> | 2004-04-13 23:50:48 +0000 |
| commit | c7141791f3afb2bb0b5bb811653ccee1423aea5f (patch) | |
| tree | d1c0f4a3c7083c0c15708d7f85889f9046face52 /usr.bin | |
| parent | 907d74bb26b00c3857d7ec2755d80c39b90455e4 (diff) | |
Notes
Diffstat (limited to 'usr.bin')
| -rw-r--r-- | usr.bin/tar/write.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/tar/write.c b/usr.bin/tar/write.c index d2eed4bf4d239..62a3d2eda4c9a 100644 --- a/usr.bin/tar/write.c +++ b/usr.bin/tar/write.c @@ -807,7 +807,7 @@ record_hardlink(struct bsdtar *bsdtar, struct archive_entry *entry, */ for (le = bsdtar->links_head; le != NULL; le = le->next) { if (le->dev == st->st_dev && le->ino == st->st_ino) { - archive_entry_set_hardlink(entry, le->name); + archive_entry_copy_hardlink(entry, le->name); /* * Decrement link count each time and release @@ -820,6 +820,8 @@ record_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); if (bsdtar->links_head == le) bsdtar->links_head = le->next; free(le); |
