]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
sanity check for flags
authorAlan T. DeKok <aland@freeradius.org>
Thu, 12 May 2022 02:09:13 +0000 (22:09 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 16 May 2022 19:00:22 +0000 (15:00 -0400)
the caller should't set run-time flags.

src/lib/unlang/xlat_builtin.c

index b02d88e7f778f28e16d8d8455df6fe87d121ed3e..b0e2dade7adf58361f64b80a5d79fef15bfc3766 100644 (file)
@@ -180,7 +180,11 @@ xlat_t *xlat_register_module(TALLOC_CTX *ctx, module_inst_ctx_t const *mctx,
                return NULL;
        }
 
-       if (!flags) flags = &default_flags;
+       if (!flags) {
+               flags = &default_flags;
+       } else {
+               fr_assert(!flags->needs_resolving);
+       }
 
        /*
         *      If it already exists, replace the instance.