]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
some protocols don't have init/free
authorAlan T. DeKok <aland@freeradius.org>
Sat, 3 Feb 2024 15:27:13 +0000 (10:27 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Sat, 3 Feb 2024 15:27:13 +0000 (10:27 -0500)
src/lib/util/dict_util.c

index 68762f619b0cc7504303f9d1db31300897e83463..3f8e29a48c3fec2a740ec98d315a49ebba1f10e2 100644 (file)
@@ -3347,9 +3347,7 @@ static int _dict_free(fr_dict_t *dict)
        /*
         *      If we called init(), then call free()
         */
-       if (dict->loaded) {
-               fr_assert(dict->proto);
-               fr_assert(dict->proto->free);
+       if (dict->loaded && dict->proto && dict->proto->free) {
                dict->proto->free();
        }