]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
da->parent is NULL at the root
authorAlan T. DeKok <aland@freeradius.org>
Tue, 21 Dec 2021 20:07:24 +0000 (15:07 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 21 Dec 2021 20:07:24 +0000 (15:07 -0500)
src/lib/util/dict_unknown.c

index e65a68dfe6b31d623358cf5dbc5a84e6487c4c26..7279893cc922363303b6efd41bad89ebfa9c0c85 100644 (file)
@@ -368,7 +368,7 @@ fr_dict_attr_t      *fr_dict_unknown_attr_afrom_da(TALLOC_CTX *ctx, fr_dict_attr_t co
         *      parents when this 'da' is freed.  We therefore talloc
         *      the parent from the 'da'.
         */
-       if (da->parent->flags.is_unknown) {
+       if (da->parent && da->parent->flags.is_unknown) {
                parent = fr_dict_unknown_afrom_da(n, da->parent);
                if (!parent) {
                        talloc_free(n);