comparison tests.c @ 785:bca32201868e

Plug another memory leak in tests.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 20 Dec 2023 07:57:25 +0200
parents 1db55c733f7d
children c51f056f3557
comparison
equal deleted inserted replaced
784:1db55c733f7d 785:bca32201868e
675 // Sort 675 // Sort
676 th_llist_mergesort(&list, test_llist_sortfunc, NULL); 676 th_llist_mergesort(&list, test_llist_sortfunc, NULL);
677 test_linked_list_validity(list, 0, 1); 677 test_linked_list_validity(list, 0, 1);
678 678
679 // Delete 679 // Delete
680 th_llist_delete_node(&list, list); 680 node = list;
681 th_llist_delete_node(&list, node);
681 test_linked_list_length(list, nnodes - 1); 682 test_linked_list_length(list, nnodes - 1);
682 test_linked_list_validity(list, 1, 1); 683 test_linked_list_validity(list, 1, 1);
684 th_free(node);
683 685
684 out: 686 out:
685 th_llist_free(list); 687 th_llist_free(list);
686 } 688 }
687 689