From 385b3bdb474b9152e5aa8fb05936864d0cedb504 Mon Sep 17 00:00:00 2001 From: Přemysl Janouch Date: Sun, 3 Jan 2016 23:32:42 +0100 Subject: Fix some leaks in tests --- tests/liberty.c | 18 +++++++++--------- 1 file 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); -- cgit v1.2.3-70-g09d2