]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
initialize "out" so that it's NULL on error
authorAlan T. DeKok <aland@freeradius.org>
Sat, 5 Dec 2020 14:43:06 +0000 (09:43 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Sun, 6 Dec 2020 02:48:10 +0000 (21:48 -0500)
otherwise unit_test_attribute crashes

src/lib/util/dict_tokenize.c

index 3fece535a072c51f9515712cac778741b4a3e552..a53b1cf68e5b05104ad271261deae15984811267 100644 (file)
@@ -2726,6 +2726,8 @@ int fr_dict_protocol_afrom_file(fr_dict_t **out, char const *proto_name, char co
        char            *dict_dir = NULL;
        fr_dict_t       *dict;
 
+       *out = NULL;
+
        if (unlikely(!dict_gctx)) {
                fr_strerror_printf("fr_dict_global_ctx_init() must be called before loading dictionary files");
                return -1;