diff options
Diffstat (limited to 'archivers/libarchive/files/tar/write.c')
-rw-r--r-- | archivers/libarchive/files/tar/write.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/archivers/libarchive/files/tar/write.c b/archivers/libarchive/files/tar/write.c index e15cc06ccfc..09c44a3e747 100644 --- a/archivers/libarchive/files/tar/write.c +++ b/archivers/libarchive/files/tar/write.c @@ -540,8 +540,7 @@ write_archive(struct archive *a, struct bsdtar *bsdtar) lafe_warnc(archive_errno(disk), "%s", archive_error_string(disk)); bsdtar->return_value = 1; - archive_entry_free(entry); - continue; + goto next_entry; } /* @@ -557,15 +556,14 @@ write_archive(struct archive *a, struct bsdtar *bsdtar) "%s", archive_error_string(disk)); if (r == ARCHIVE_FATAL) bsdtar->return_value = 1; - else - archive_read_close(disk); - archive_entry_free(entry); - continue; + archive_read_close(disk); + goto next_entry; } write_file(bsdtar, a, entry); - archive_entry_free(entry); archive_read_close(disk); +next_entry: + archive_entry_free(entry); entry = NULL; archive_entry_linkify(bsdtar->resolver, &entry, &sparse_entry); } |