return -1;
}
+ /*
+ * Free the dictionary. It will call proto->free() if there's nothing more to do.
+ */
for (i = 0; i < talloc_array_length(refd_list); i++) {
- if (refd_list[i]->proto->free) refd_list[i]->proto->free();
-
if (fr_dict_free(&refd_list[i], dict->root->name) < 0) {
fr_strerror_printf("failed freeing autoloaded protocol %s", refd_list[i]->root->name);
return -1;
return -1;
}
-// if (dict_autoref_free(dict) < 0) return -1;
-
/*
* Free the hash tables with free functions first
* so that the things the hash tables reference
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);