aboutsummaryrefslogtreecommitdiffstats
path: root/src/cfg_utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cfg_utils.c')
-rw-r--r--src/cfg_utils.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/cfg_utils.c b/src/cfg_utils.c
index ae0971d6a..7b1910324 100644
--- a/src/cfg_utils.c
+++ b/src/cfg_utils.c
@@ -236,6 +236,9 @@ init_defaults (struct config_file *cfg)
void
free_config (struct config_file *cfg)
{
+ GList *cur;
+ struct symbols_group *gr;
+
remove_all_maps (cfg);
g_hash_table_remove_all (cfg->modules_opts);
g_hash_table_unref (cfg->modules_opts);
@@ -251,6 +254,19 @@ free_config (struct config_file *cfg)
g_hash_table_unref (cfg->cfg_params);
g_hash_table_destroy (cfg->metrics_symbols);
g_hash_table_destroy (cfg->classifiers_symbols);
+ /* Free symbols groups */
+ cur = cfg->symbols_groups;
+ while (cur) {
+ gr = cur->data;
+ if (gr->symbols) {
+ g_list_free (gr->symbols);
+ }
+ cur = g_list_next (cur);
+ }
+ if (cfg->symbols_groups) {
+ g_list_free (cfg->symbols_groups);
+ }
+
if (cfg->checksum) {
g_free (cfg->checksum);
}