diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2013-01-06 17:26:17 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2013-01-06 17:26:17 +0400 |
commit | 54c2f784b7848b15f0a12329dd282e24fad87c04 (patch) | |
tree | 566c99d17ad85d9c11cfa2c9c8c94ec04fe66376 /src/cfg_utils.c | |
parent | 393a7c39ecc9224faa7c11afc32c8e74f54ea3c5 (diff) | |
download | rspamd-54c2f784b7848b15f0a12329dd282e24fad87c04.tar.gz rspamd-54c2f784b7848b15f0a12329dd282e24fad87c04.zip |
* Add symbols command for webui.
Diffstat (limited to 'src/cfg_utils.c')
-rw-r--r-- | src/cfg_utils.c | 16 |
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); } |