From: Alan T. DeKok Date: Tue, 16 Oct 2018 17:31:51 +0000 (-0400) Subject: fix static analysis warning X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=308f43fae77e97aaa3dcb0aa4adadd5a8d8d4131;p=thirdparty%2Ffreeradius-server.git fix static analysis warning --- diff --git a/src/lib/util/struct.c b/src/lib/util/struct.c index c993bece42a..c1ce8cf4879 100644 --- a/src/lib/util/struct.c +++ b/src/lib/util/struct.c @@ -30,6 +30,10 @@ VALUE_PAIR *fr_unknown_from_network(TALLOC_CTX *ctx, fr_dict_attr_t const *paren VALUE_PAIR *vp; fr_dict_attr_t const *child; +#ifndef NDEBUG + if (!parent->parent) return NULL; /* stupid static analyzers */ +#endif + /* * Build an unknown attr of the entire STRUCT. */