summaryrefslogtreecommitdiff
path: root/cpio/test/test_option_grzip.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpio/test/test_option_grzip.c')
-rw-r--r--cpio/test/test_option_grzip.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/cpio/test/test_option_grzip.c b/cpio/test/test_option_grzip.c
index dfce2e06..7e7dd2c8 100644
--- a/cpio/test/test_option_grzip.c
+++ b/cpio/test/test_option_grzip.c
@@ -44,9 +44,10 @@ DEFINE_TEST(test_option_grzip)
systemf("echo f | %s -o --grzip >archive.out 2>archive.err",
testprog));
p = slurpfile(&s, "archive.err");
- p[s] = '\0';
+ free(p);
/* Check that the archive file has an grzip signature. */
p = slurpfile(&s, "archive.out");
assert(s > 2);
assertEqualMem(p, "GRZipII\x00\x02\x04:)", 12);
+ free(p);
}