]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
don't free dictionaries until we track down reference issues
authorAlan T. DeKok <aland@freeradius.org>
Sun, 4 Feb 2024 03:17:29 +0000 (22:17 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Sun, 4 Feb 2024 03:17:29 +0000 (22:17 -0500)
There are issues with calling proto->free() in the destructor
for the dictionaries

there are issues with foreign references.

src/lib/util/dict_util.c

index 3f8e29a48c3fec2a740ec98d315a49ebba1f10e2..0ff8004da76bc42cd82f2e9836b9e2d899a227f1 100644 (file)
@@ -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);