]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Allow for unlang_ctx->rules == NULL
authorNick Porter <nick@portercomputing.co.uk>
Fri, 19 May 2023 07:53:21 +0000 (08:53 +0100)
committerNick Porter <nick@portercomputing.co.uk>
Fri, 19 May 2023 07:53:21 +0000 (08:53 +0100)
src/lib/unlang/compile.c

index 1699edc7aba970500938185b682364b8e62dcb23..1949312ef41cf47f968cdf5be5e8f0006d46a09c 100644 (file)
@@ -4726,7 +4726,8 @@ static unlang_t *compile_module(unlang_t *parent, unlang_compile_t *unlang_ctx,
 
                call_env_parsed_init(&single->call_env_parsed);
                if (call_env_parse(single->call_env_ctx, &single->call_env_parsed, single->self.name,
-                                  unlang_ctx->rules->attr.dict_def, inst->dl_inst->conf, method_env->env) < 0) {
+                                  unlang_ctx->rules ? unlang_ctx->rules->attr.dict_def : fr_dict_internal(),
+                                  inst->dl_inst->conf, method_env->env) < 0) {
                error:
                        talloc_free(c);
                        return NULL;