From: Grzegorz Antoniak Date: Sun, 5 May 2019 05:05:10 +0000 (+0200) Subject: Fixed memory leak in test_read_format_raw X-Git-Tag: v3.4.0~52^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F1189%2Fhead;p=thirdparty%2Flibarchive.git Fixed memory leak in test_read_format_raw This commit fixes the memory leak introduced by accident in 0debf359. --- diff --git a/libarchive/test/test_read_format_raw.c b/libarchive/test/test_read_format_raw.c index ccd9d0acb..0dac8bfba 100644 --- a/libarchive/test/test_read_format_raw.c +++ b/libarchive/test/test_read_format_raw.c @@ -114,6 +114,11 @@ DEFINE_TEST(test_read_format_raw) assert(!archive_entry_ctime_is_set(ae)); assert(!archive_entry_mtime_is_set(ae)); + /* Test EOF */ + assertEqualIntA(a, ARCHIVE_EOF, archive_read_next_header(a, &ae)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a)); + assertEqualInt(ARCHIVE_OK, archive_read_free(a)); + /* Fourth, try with gzip which has metadata. */ extract_reference_file(reffile4); assert((a = archive_read_new()) != NULL);