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:
parent
371f7ed874
commit
a40e11e022
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user