From 85efd7f8759590df15b06d680dc2c141a499d7d3 Mon Sep 17 00:00:00 2001 From: joerg Date: Sun, 22 Sep 2019 09:51:28 +0000 Subject: Import libarchive 3.4.0 --- .../libarchive/files/libarchive/archive_write_set_format_shar.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'archivers/libarchive/files/libarchive/archive_write_set_format_shar.c') 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 '/'. */ -- cgit v1.2.3