summaryrefslogtreecommitdiff
path: root/cpio
diff options
context:
space:
mode:
Diffstat (limited to 'cpio')
-rw-r--r--cpio/cpio.c2
-rw-r--r--cpio/test/test_option_J_upper.c1
2 files changed, 3 insertions, 0 deletions
diff --git a/cpio/cpio.c b/cpio/cpio.c
index 4acab9d2..7ed6a823 100644
--- a/cpio/cpio.c
+++ b/cpio/cpio.c
@@ -442,6 +442,8 @@ main(int argc, char *argv[])
archive_match_free(cpio->matching);
free_cache(cpio->gname_cache);
free_cache(cpio->uname_cache);
+ archive_read_close(cpio->archive_read_disk);
+ archive_read_free(cpio->archive_read_disk);
free(cpio->destdir);
passphrase_free(cpio->ppbuff);
return (cpio->return_value);
diff --git a/cpio/test/test_option_J_upper.c b/cpio/test/test_option_J_upper.c
index 1d7d0513..e19d599e 100644
--- a/cpio/test/test_option_J_upper.c
+++ b/cpio/test/test_option_J_upper.c
@@ -43,6 +43,7 @@ DEFINE_TEST(test_option_J_upper)
if (strstr(p, "compression not available") != NULL) {
skipping("This version of bsdcpio was compiled "
"without xz support");
+ free(p);
return;
}
failure("-J option is broken");