summaryrefslogtreecommitdiff
path: root/test_utils
diff options
context:
space:
mode:
authorJoerg Sonnenberger <joerg@bec.de>2017-04-29 18:57:33 +0200
committerJoerg Sonnenberger <joerg@bec.de>2017-04-29 18:57:33 +0200
commit747631a66543647078726e2699b0d9b4ae3ed4c4 (patch)
tree6a4f7d14d526703cb054655e511cc40a31743890 /test_utils
parent31f4594ca8d7e108c0d13a308ab519eef828541e (diff)
downloadlibarchive-747631a66543647078726e2699b0d9b4ae3ed4c4.tar.gz
Don't leak memory.
Diffstat (limited to 'test_utils')
-rw-r--r--test_utils/test_main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/test_utils/test_main.c b/test_utils/test_main.c
index d7404593..0e141369 100644
--- a/test_utils/test_main.c
+++ b/test_utils/test_main.c
@@ -1102,6 +1102,7 @@ assertion_file_contains_lines_any_order(const char *file, int line,
failure_start(pathname, line, "Can't allocate memory");
failure_finish(NULL);
free(expected);
+ free(buff);
return (0);
}
for (i = 0; lines[i] != NULL; ++i) {
@@ -1124,6 +1125,7 @@ assertion_file_contains_lines_any_order(const char *file, int line,
failure_start(pathname, line, "Can't allocate memory");
failure_finish(NULL);
free(expected);
+ free(buff);
return (0);
}
for (j = 0, p = buff; p < buff + buff_size;