Free up the entry objects allocated during this test.
This commit is contained in:
parent
ee09b4a896
commit
c37b281ebc
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user