From: Alan T. DeKok Date: Sun, 1 Sep 2024 12:46:16 +0000 (-0400) Subject: quiet static analyzer X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1cfcc0f3caa38202a77612ed1365c647313870de;p=thirdparty%2Ffreeradius-server.git quiet static analyzer --- diff --git a/src/lib/server/tmpl_tokenize.c b/src/lib/server/tmpl_tokenize.c index fee0924eb4..6a8a0df3c4 100644 --- a/src/lib/server/tmpl_tokenize.c +++ b/src/lib/server/tmpl_tokenize.c @@ -1442,15 +1442,12 @@ static fr_slen_t tmpl_attr_parse_filter(tmpl_attr_error_t *err, tmpl_attr_t *ar, * * In order to fix that, we have to */ - if (!fr_type_is_structural(ar->ar_da->type)) { + if (!ar->ar_da || !fr_type_is_structural(ar->ar_da->type)) { fr_strerror_printf("Invalid filter - cannot use filter on leaf attributes"); ar->ar_num = 0; goto error; } - fr_assert(ar->ar_da != NULL); - fr_assert(fr_type_is_structural(ar->ar_da->type)); - tmp = FR_SBUFF(&our_name); t_rules = (tmpl_rules_t) {}; t_rules.attr = *at_rules;