]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Autofree all the dictionaries instead of just the first one
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 19 Oct 2018 14:41:38 +0000 (10:41 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 10 Dec 2018 16:20:30 +0000 (11:20 -0500)
src/lib/util/dict.c

index 7b076eb737c136079496cc06f243e817a29aeaaa..2cd80ed93a65ea3d683f90a7680b1d29cdc42eea 100644 (file)
@@ -5409,14 +5409,13 @@ int fr_dict_autoload(fr_dict_autoload_t const *to_load)
 void fr_dict_autofree(fr_dict_autoload_t const *to_free)
 {
        fr_dict_t                       **dict;
-       fr_dict_autoload_t const        *p = to_free;
+       fr_dict_autoload_t const        *p;
 
        for (p = to_free; p->out; p++) {
-               dict = to_free->out;
+               dict = p->out;
                if (!*dict) continue;
 
-               talloc_decrease_ref_count(*dict);
-               *dict = NULL;
+               fr_dict_free(dict);
        }
 }