Don't leak test items in list unit test

This is useful when using valgrind, since its easier to see the errors.
This commit is contained in:
Brad Hards 2011-07-26 11:19:58 +10:00
parent 371f7ed874
commit a40e11e022

View File

@ -90,9 +90,11 @@ void test_list(void)
CU_ASSERT(my_list_remove(list, item1) == item1);
my_list_item_free(item1);
xfree(item1);
CU_ASSERT(my_list_remove(list, item2) == item2);
CU_ASSERT(my_list_remove(list, item2) == NULL);
my_list_item_free(item2);
xfree(item2);
my_list_free(list);
}