]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
the new child is always parented by the new dst DA
authorAlan T. DeKok <aland@freeradius.org>
Fri, 21 Nov 2025 21:37:51 +0000 (16:37 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 21 Nov 2025 22:09:21 +0000 (17:09 -0500)
otherwise the child is marked up as having the old parent, which
is wrong.

src/lib/util/dict_util.c

index dc5c4136a0873e07c7e7ac3c8bdab1f67e9d181d..c453fa74867bcfecc521af4d8452e29ca2bfd503 100644 (file)
@@ -1175,11 +1175,7 @@ static int dict_attr_acopy_child(fr_dict_t *dict, fr_dict_attr_t *dst, fr_dict_a
 {
        fr_dict_attr_t                  *copy;
 
-       if (child->dict == dict) {
-               copy = dict_attr_acopy(dict->pool, child, NULL);
-       } else {
-               copy = dict_attr_acopy_dict(dict->pool, dst, child);
-       }
+       copy = dict_attr_acopy_dict(dict->pool, dst, child);
        if (!copy) return -1;
 
        fr_assert(copy->parent == dst);