summaryrefslogtreecommitdiffstats
path: root/lib/libarchive/test/test_tar_filenames.c
diff options
context:
space:
mode:
authorkientzle <kientzle@FreeBSD.org>2007-04-15 04:30:02 +0000
committerkientzle <kientzle@FreeBSD.org>2007-04-15 04:30:02 +0000
commite790087db093ba1fab8af4aef9b2927ee222a76b (patch)
tree51a93efe938cf99fb90bb296ef4d8d4a59fd9c5f /lib/libarchive/test/test_tar_filenames.c
parent5b9b31cc4237f558f84a99e26c931d7fe108a07b (diff)
downloadFreeBSD-src-e790087db093ba1fab8af4aef9b2927ee222a76b.zip
FreeBSD-src-e790087db093ba1fab8af4aef9b2927ee222a76b.tar.gz
Clean up a lot of memory leaks in the libarchive test harness.
Diffstat (limited to 'lib/libarchive/test/test_tar_filenames.c')
-rw-r--r--lib/libarchive/test/test_tar_filenames.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/libarchive/test/test_tar_filenames.c b/lib/libarchive/test/test_tar_filenames.c
index 57545ba..0f3c082 100644
--- a/lib/libarchive/test/test_tar_filenames.c
+++ b/lib/libarchive/test/test_tar_filenames.c
@@ -66,6 +66,7 @@ test_filename(int dlen, int flen)
archive_entry_set_mode(ae, S_IFREG | 0755);
failure("Pathname %d/%d", dlen, flen);
assertA(0 == archive_write_header(a, ae));
+ archive_entry_free(ae);
/*
* Write a dir to it (without trailing '/').
@@ -75,6 +76,7 @@ test_filename(int dlen, int flen)
archive_entry_set_mode(ae, S_IFDIR | 0755);
failure("Dirname %d/%d", dlen, flen);
assertA(0 == archive_write_header(a, ae));
+ archive_entry_free(ae);
/* Tar adds a '/' to directory names. */
strcat(dirname, "/");
@@ -87,6 +89,7 @@ test_filename(int dlen, int flen)
archive_entry_set_mode(ae, S_IFDIR | 0755);
failure("Dirname %d/%d", dlen, flen);
assertA(0 == archive_write_header(a, ae));
+ archive_entry_free(ae);
/* Close out the archive. */
assertA(0 == archive_write_close(a));
OpenPOWER on IntegriCloud