From: Arran Cudbard-Bell Date: Fri, 19 Oct 2018 14:41:38 +0000 (-0400) Subject: Autofree all the dictionaries instead of just the first one X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b9ffb7900a94d7664afe75a639d71f8eab37d344;p=thirdparty%2Ffreeradius-server.git Autofree all the dictionaries instead of just the first one --- diff --git a/src/lib/util/dict.c b/src/lib/util/dict.c index 7b076eb737c..2cd80ed93a6 100644 --- a/src/lib/util/dict.c +++ b/src/lib/util/dict.c @@ -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); } }