]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
fix static analysis warning
authorAlan T. DeKok <aland@freeradius.org>
Tue, 16 Oct 2018 17:31:51 +0000 (13:31 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 16 Oct 2018 17:31:51 +0000 (13:31 -0400)
src/lib/util/struct.c

index c993bece42a87b4811e8c464bc6117ced362eab0..c1ce8cf48795684108b26d775a42e35ed26a0e58 100644 (file)
@@ -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.
         */