]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
use found parent, not old parent.
authorAlan T. DeKok <aland@freeradius.org>
Fri, 20 Jan 2017 17:44:49 +0000 (12:44 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 20 Jan 2017 18:18:52 +0000 (13:18 -0500)
The found parent may have just been created

src/lib/dict.c

index ba86581816f0a5eba287e71ece8a357e3ec80727..d47dcd0d8639970f7673b70423c3d270eb5be14e 100644 (file)
@@ -2826,13 +2826,13 @@ fr_dict_attr_t const *fr_dict_unknown_add(fr_dict_t *dict, fr_dict_attr_t const
                 *      is responsible for converting "Attr-26 = 0x..." to an actual attribute,
                 *      if it so desires.
                 */
-               return fr_dict_attr_add_by_name(dict, old->parent, old->name, old->attr, old->type, flags);
+               return fr_dict_attr_add_by_name(dict, parent, old->name, old->attr, old->type, flags);
        }
 
        /*
         *      Add the attribute by bioth name and number.
         */
-       if (fr_dict_attr_add(dict, old->parent, old->name, old->attr, old->type, flags) < 0) return NULL;
+       if (fr_dict_attr_add(dict, parent, old->name, old->attr, old->type, flags) < 0) return NULL;
 
        /*
         *      For paranoia, return it by name.