From: Michihiro NAKAJIMA Date: Tue, 28 Feb 2012 08:28:16 +0000 (+0900) Subject: Properly call archive_read_close() after archive_read_disk_open(). X-Git-Tag: v3.0.4~2^2~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fe2fbc051adb39a164fba81e0a3489176e765f06;p=thirdparty%2Flibarchive.git Properly call archive_read_close() after archive_read_disk_open(). --- diff --git a/tar/write.c b/tar/write.c index 521e2770f..273fdda3b 100644 --- a/tar/write.c +++ b/tar/write.c @@ -515,12 +515,15 @@ 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; } write_file(bsdtar, a, entry); archive_entry_free(entry); + archive_read_close(disk); entry = NULL; archive_entry_linkify(bsdtar->resolver, &entry, &sparse_entry); }