]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
quiet static analyzer
authorAlan T. DeKok <aland@freeradius.org>
Sun, 1 Sep 2024 12:46:16 +0000 (08:46 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Sun, 1 Sep 2024 12:46:16 +0000 (08:46 -0400)
src/lib/server/tmpl_tokenize.c

index fee0924eb48297bcb76cc4396a57fe57ebddd846..6a8a0df3c4cce99d42a9ae7668a4b4fff62acbe0 100644 (file)
@@ -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;