]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
clean up for clang scan
authorAlan T. DeKok <aland@freeradius.org>
Tue, 31 Oct 2023 15:14:51 +0000 (11:14 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 31 Oct 2023 15:17:18 +0000 (11:17 -0400)
src/lib/server/map.c

index 2b81362844e746faae85cc4259689628d52604f3..fe0e5f83f48feb5a770fefcc49e02aaf45f3abb4 100644 (file)
@@ -195,7 +195,6 @@ int map_afrom_cp(TALLOC_CTX *ctx, map_t **out, map_t *parent, CONF_PAIR *cp,
                }
                rhs_rules = &my_rhs_rules;
 
-               da = tmpl_attr_tail_da(map->lhs);
                if (edit) my_rhs_rules.enumv = tmpl_attr_tail_da(map->lhs);
                break;
        }
@@ -252,7 +251,7 @@ int map_afrom_cp(TALLOC_CTX *ctx, map_t **out, map_t *parent, CONF_PAIR *cp,
         *      "group".  The edit code will take the string, create
         *      pairs, and work on that.
         */
-       if (edit && my_rhs_rules.enumv && fr_type_is_structural(my_rhs_rules.enumv->type) &&
+       if (edit && (rhs_rules == &my_rhs_rules) && my_rhs_rules.enumv && fr_type_is_structural(my_rhs_rules.enumv->type) &&
            ((type == T_DOUBLE_QUOTED_STRING) || (type == T_BACK_QUOTED_STRING) || (type == T_SINGLE_QUOTED_STRING))) {
                my_rhs_rules.enumv = NULL;
        }