]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
We always need to initialise the request code so we have the list attributes
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 12 Dec 2022 04:07:38 +0000 (22:07 -0600)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 12 Dec 2022 04:07:38 +0000 (22:07 -0600)
src/bin/unit_test_attribute.c

index 231c12452869e8ee71bb9649e36bc6d09ccbbc03..b6eb7d87f2db44c59983600f532b9d42bfba27ca 100644 (file)
@@ -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");