From: Alan T. DeKok Date: Tue, 21 Dec 2021 21:48:22 +0000 (-0500) Subject: da->parent may be NULL here, too. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=08bfc46147e6819529f56d070e25610cd0ba9279;p=thirdparty%2Ffreeradius-server.git da->parent may be NULL here, too. we have fr_dict_unknown_attr_afrom_da() and fr_dict_unknown_afrom_da() which are 90% identical. Perhaps some common code would help. --- diff --git a/src/lib/util/dict_unknown.c b/src/lib/util/dict_unknown.c index 7279893cc92..6065587aeb6 100644 --- a/src/lib/util/dict_unknown.c +++ b/src/lib/util/dict_unknown.c @@ -197,7 +197,7 @@ fr_dict_attr_t *fr_dict_unknown_afrom_da(TALLOC_CTX *ctx, fr_dict_attr_t const * * parents when this 'da' is freed. We therefore talloc * the parent from the 'da'. */ - if (da->parent->flags.is_unknown) { + if (d->parent && da->parent->flags.is_unknown) { parent = fr_dict_unknown_afrom_da(n, da->parent); if (!parent) { talloc_free(n);