From: Alan T. DeKok Date: Sun, 4 Feb 2024 03:17:29 +0000 (-0500) Subject: don't free dictionaries until we track down reference issues X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f1c09347507aa94be24adf1cfeca86260c482f95;p=thirdparty%2Ffreeradius-server.git don't free dictionaries until we track down reference issues There are issues with calling proto->free() in the destructor for the dictionaries there are issues with foreign references. --- diff --git a/src/lib/util/dict_util.c b/src/lib/util/dict_util.c index 3f8e29a48c3..0ff8004da76 100644 --- a/src/lib/util/dict_util.c +++ b/src/lib/util/dict_util.c @@ -3344,12 +3344,14 @@ static int _dict_free(fr_dict_t *dict) } #endif +#if 0 /* * If we called init(), then call free() */ - if (dict->loaded && dict->proto && dict->proto->free) { + if (dict->proto && dict->proto->free) { dict->proto->free(); } +#endif if (!fr_cond_assert(!dict->in_protocol_by_name || fr_hash_table_delete(dict->gctx->protocol_by_name, dict))) { fr_strerror_printf("Failed removing dictionary from protocol hash \"%s\"", dict->root->name); @@ -3378,7 +3380,7 @@ static int _dict_free(fr_dict_t *dict) return -1; } - if (dict_autoref_free(dict) < 0) return -1; +// if (dict_autoref_free(dict) < 0) return -1; /* * Free the hash tables with free functions first @@ -3921,7 +3923,7 @@ static int _dict_global_free(fr_dict_gctx_t *gctx) dict = fr_hash_table_iter_next(gctx->protocol_by_name, &iter)) { (void)talloc_get_type_abort(dict, fr_dict_t); - if (dict_autoref_free(dict) < 0) return -1; +// if (dict_autoref_free(dict) < 0) return -1; } for (dict = fr_hash_table_iter_init(gctx->protocol_by_name, &iter);