aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libarchive/cpio/test/test_option_u.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/libarchive/cpio/test/test_option_u.c')
-rw-r--r--contrib/libarchive/cpio/test/test_option_u.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/contrib/libarchive/cpio/test/test_option_u.c b/contrib/libarchive/cpio/test/test_option_u.c
index b377def020fb..cc790b1c0af2 100644
--- a/contrib/libarchive/cpio/test/test_option_u.c
+++ b/contrib/libarchive/cpio/test/test_option_u.c
@@ -49,6 +49,7 @@ DEFINE_TEST(test_option_u)
p = slurpfile(&s, "copy/f");
assertEqualInt(s, 1);
assertEqualMem(p, "a", 1);
+ free(p);
/* Recreate the file with a single "b" */
assertMakeFile("f", 0644, "b");
@@ -68,6 +69,7 @@ DEFINE_TEST(test_option_u)
p = slurpfile(&s, "copy/f");
assertEqualInt(s, 1);
assertEqualMem(p, "a", 1);
+ free(p);
/* Copy the file to the "copy" dir with -u (force) */
r = systemf("echo f| %s -pud copy >copy.out 2>copy.err",
@@ -78,4 +80,5 @@ DEFINE_TEST(test_option_u)
p = slurpfile(&s, "copy/f");
assertEqualInt(s, 1);
assertEqualMem(p, "b", 1);
+ free(p);
}