From: Alan T. DeKok Date: Wed, 6 Nov 2019 15:21:17 +0000 (-0500) Subject: unload dl's, too. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=956e9f8329a980110ac2ca349333c9a59752aaa4;p=thirdparty%2Ffreeradius-server.git unload dl's, too. --- diff --git a/src/lib/util/dict_util.c b/src/lib/util/dict_util.c index 4678173f3b2..e85a0d492b3 100644 --- a/src/lib/util/dict_util.c +++ b/src/lib/util/dict_util.c @@ -2557,8 +2557,24 @@ static int dict_onload_func(dl_t const *dl, void *symbol, UNUSED void *user_ctx) return 0; } +static int _dict_dl_free(UNUSED void *ctx, void *data) +{ + fr_dict_t *dict = data; + + if (!dict->dl) return 0; + + talloc_free(dict->dl); + dict->dl = NULL; + dict->proto = NULL; + dict->subtype_table = NULL; + + return 0; +} + static int _dict_global_free(dict_gctx_t *ctx) { + (void) fr_hash_table_walk(dict_gctx->protocol_by_name, _dict_dl_free, NULL); + talloc_free(ctx->dict_loader); /*