aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2016-01-03 23:32:42 +0100
committerPřemysl Janouch <p.janouch@gmail.com>2016-01-03 23:35:21 +0100
commit385b3bdb474b9152e5aa8fb05936864d0cedb504 (patch)
treee0ef1809bf5c07e436ebc0319268d6e3f6d0e763 /tests
parent020a11a5b574b36b6d65e022dd83bae8a4bee6b3 (diff)
downloadliberty-385b3bdb474b9152e5aa8fb05936864d0cedb504.tar.gz
liberty-385b3bdb474b9152e5aa8fb05936864d0cedb504.tar.xz
liberty-385b3bdb474b9152e5aa8fb05936864d0cedb504.zip
Fix some leaks in tests
Diffstat (limited to 'tests')
-rw-r--r--tests/liberty.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/liberty.c b/tests/liberty.c
index 40a6993..3676a45 100644
--- a/tests/liberty.c
+++ b/tests/liberty.c
@@ -104,10 +104,10 @@ test_list (void)
}
// Remove a few entries
- LIST_UNLINK (list, a[0]); a[0] = NULL;
- LIST_UNLINK (list, a[3]); a[3] = NULL;
- LIST_UNLINK (list, a[4]); a[4] = NULL;
- LIST_UNLINK (list, a[6]); a[6] = NULL;
+ LIST_UNLINK (list, a[0]); free (a[0]); a[0] = NULL;
+ LIST_UNLINK (list, a[3]); free (a[3]); a[3] = NULL;
+ LIST_UNLINK (list, a[4]); free (a[4]); a[4] = NULL;
+ LIST_UNLINK (list, a[6]); free (a[6]); a[6] = NULL;
// Prepend one more item
a[0] = make_link (0);
@@ -136,11 +136,11 @@ test_list_with_tail (void)
}
// Remove a few entries
- LIST_UNLINK_WITH_TAIL (list, tail, a[0]); a[0] = NULL;
- LIST_UNLINK_WITH_TAIL (list, tail, a[3]); a[3] = NULL;
- LIST_UNLINK_WITH_TAIL (list, tail, a[4]); a[4] = NULL;
- LIST_UNLINK_WITH_TAIL (list, tail, a[6]); a[6] = NULL;
- LIST_UNLINK_WITH_TAIL (list, tail, a[9]); a[9] = NULL;
+ LIST_UNLINK_WITH_TAIL (list, tail, a[0]); free (a[0]); a[0] = NULL;
+ LIST_UNLINK_WITH_TAIL (list, tail, a[3]); free (a[3]); a[3] = NULL;
+ LIST_UNLINK_WITH_TAIL (list, tail, a[4]); free (a[4]); a[4] = NULL;
+ LIST_UNLINK_WITH_TAIL (list, tail, a[6]); free (a[6]); a[6] = NULL;
+ LIST_UNLINK_WITH_TAIL (list, tail, a[9]); free (a[9]); a[9] = NULL;
// Append one more item
a[9] = make_link (9);