From: Alan T. DeKok Date: Tue, 5 Apr 2022 22:22:27 +0000 (-0400) Subject: manually free the pair list, as done in the other test functions. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=09433ca9bdc42a85fc78008534c76942d5d34ddb;p=thirdparty%2Ffreeradius-server.git manually free the pair list, as done in the other test functions. otherwise with the new tlist code, the pairs are freed via the talloc_free_children() callback, and the PAIR_VERIFY() check fails, because the pair is still in a list. --- diff --git a/src/bin/unit_test_attribute.c b/src/bin/unit_test_attribute.c index 125bac9d8c..fb9686b186 100644 --- a/src/bin/unit_test_attribute.c +++ b/src/bin/unit_test_attribute.c @@ -2343,6 +2343,8 @@ static size_t command_pair(command_result_t *result, command_file_ctx_t *cc, } } + PAIR_LIST_VERIFY(&head); + p = data; end = data + COMMAND_OUTPUT_MAX; for (vp = fr_pair_list_head(&head); @@ -2363,6 +2365,8 @@ static size_t command_pair(command_result_t *result, command_file_ctx_t *cc, if (p > data) p -= 2; *p = 0; + fr_pair_list_free(&head); + RETURN_OK(p - data); }