]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
dict_def can be NULL for unit tests
authorAlan T. DeKok <aland@freeradius.org>
Sun, 27 Aug 2023 19:48:38 +0000 (15:48 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Sun, 27 Aug 2023 19:48:38 +0000 (15:48 -0400)
src/lib/unlang/xlat_expr.c

index c57be6ffc54ef5d45f9e1b41a3c217da73c78c9e..c83492f28807601da0a997066dfcc46126400881 100644 (file)
@@ -1907,7 +1907,6 @@ static fr_slen_t tokenize_unary(xlat_exp_head_t *head, xlat_exp_t **out, fr_sbuf
        MEM(unary = xlat_exp_alloc(head, XLAT_FUNC, fr_tokens[func->token], strlen(fr_tokens[func->token])));
        unary->call.func = func;
        unary->call.dict = t_rules->attr.dict_def;
-       fr_assert(unary->call.dict != NULL);
        unary->flags = func->flags;
 
        if (tokenize_field(unary->call.args, &node, &our_in, p_rules, t_rules, bracket_rules, out_c, (c == '!')) < 0) {
@@ -2676,7 +2675,6 @@ redo:
        MEM(node = xlat_exp_alloc(head, XLAT_FUNC, fr_tokens[op], strlen(fr_tokens[op])));
        node->call.func = func;
        node->call.dict = t_rules->attr.dict_def;
-       fr_assert(node->call.dict != NULL);
        node->flags = func->flags;
 
        xlat_func_append_arg(node, lhs, logical_ops[op] && cond);