diff options
author | joerg <joerg@pkgsrc.org> | 2019-09-22 09:51:28 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2019-09-22 09:51:28 +0000 |
commit | 85efd7f8759590df15b06d680dc2c141a499d7d3 (patch) | |
tree | 89973fc4fc77a5c0ac5daa4ea8e0e1afbf23fbf5 /archivers/libarchive/files/libarchive/archive_write_set_format_shar.c | |
parent | 3d58b3c8e51f686500fbe08fc5fea947dfa036b4 (diff) | |
download | pkgsrc-85efd7f8759590df15b06d680dc2c141a499d7d3.tar.gz |
Import libarchive 3.4.0KIENTZLE
Diffstat (limited to 'archivers/libarchive/files/libarchive/archive_write_set_format_shar.c')
-rw-r--r-- | archivers/libarchive/files/libarchive/archive_write_set_format_shar.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/archivers/libarchive/files/libarchive/archive_write_set_format_shar.c b/archivers/libarchive/files/libarchive/archive_write_set_format_shar.c index 5be310a0781..600c88257a0 100644 --- a/archivers/libarchive/files/libarchive/archive_write_set_format_shar.c +++ b/archivers/libarchive/files/libarchive/archive_write_set_format_shar.c @@ -169,8 +169,7 @@ archive_write_shar_header(struct archive_write *a, struct archive_entry *entry) } /* Save the entry for the closing. */ - if (shar->entry) - archive_entry_free(shar->entry); + archive_entry_free(shar->entry); shar->entry = archive_entry_clone(entry); name = archive_entry_pathname(entry); @@ -289,8 +288,7 @@ archive_write_shar_header(struct archive_write *a, struct archive_entry *entry) "mkdir -p %s > /dev/null 2>&1\n", shar->quoted_name.s); /* Record that we just created this directory. */ - if (shar->last_dir != NULL) - free(shar->last_dir); + free(shar->last_dir); shar->last_dir = strdup(name); /* Trim a trailing '/'. */ |