From: Arran Cudbard-Bell Date: Mon, 12 Dec 2022 04:07:38 +0000 (-0600) Subject: We always need to initialise the request code so we have the list attributes X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a6fa1e74a37ba2a359fcd923db0cfd4a34340b08;p=thirdparty%2Ffreeradius-server.git We always need to initialise the request code so we have the list attributes --- diff --git a/src/bin/unit_test_attribute.c b/src/bin/unit_test_attribute.c index 231c1245286..b6eb7d87f2d 100644 --- a/src/bin/unit_test_attribute.c +++ b/src/bin/unit_test_attribute.c @@ -3833,11 +3833,13 @@ int main(int argc, char *argv[]) EXIT_WITH_FAILURE; } - if (allow_purify) { - if (request_global_init() < 0) { - fr_perror("unit_test_attribute"); - EXIT_WITH_FAILURE; - } + /* + * Always needed so we can load the list attributes + * otherwise the tmpl_tokenize code fails. + */ + if (request_global_init() < 0) { + fr_perror("unit_test_attribute"); + EXIT_WITH_FAILURE; } /* @@ -3975,7 +3977,7 @@ cleanup: unlang_free_global(); - if (allow_purify) request_global_free(); + request_global_free(); if (receipt_file && (ret == EXIT_SUCCESS) && (fr_touch(NULL, receipt_file, 0644, true, 0755) <= 0)) { fr_perror("unit_test_attribute");