Free up the entry objects allocated during this test.

This commit is contained in:
Tim Kientzle 2008-03-15 11:06:15 +00:00
parent adfb462fea
commit 845aa4ab0a

View File

@ -47,6 +47,7 @@ DEFINE_TEST(test_empty_write)
archive_entry_set_mode(ae, S_IFREG | 0755);
archive_entry_set_size(ae, 0);
assertA(0 == archive_write_header(a, ae));
archive_entry_free(ae);
/* THE TEST: write zero bytes to this entry. */
/* This used to crash. */
@ -76,6 +77,7 @@ DEFINE_TEST(test_empty_write)
archive_entry_set_mode(ae, S_IFREG | 0755);
archive_entry_set_size(ae, 0);
assertA(0 == archive_write_header(a, ae));
archive_entry_free(ae);
/* THE TEST: write zero bytes to this entry. */
assertEqualIntA(a, 0, archive_write_data(a, "", 0));
@ -104,6 +106,7 @@ DEFINE_TEST(test_empty_write)
archive_entry_set_mode(ae, S_IFREG | 0755);
archive_entry_set_size(ae, 0);
assertA(0 == archive_write_header(a, ae));
archive_entry_free(ae);
/* THE TEST: write zero bytes to this entry. */
assertEqualIntA(a, 0, archive_write_data(a, "", 0));