diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-10-10 23:41:34 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-10-10 23:41:34 +0100 |
commit | 43fabec7e1b1db64bf6d36839f601f18da7bda91 (patch) | |
tree | c5e1e879aa871c5ef00954b9fd80ad3d84a21894 /src/libserver/cfg_utils.c | |
parent | 347a46329722cb05d2b968e749773a1d0c2594ca (diff) | |
download | rspamd-43fabec7e1b1db64bf6d36839f601f18da7bda91.tar.gz rspamd-43fabec7e1b1db64bf6d36839f601f18da7bda91.zip |
Fix C modules initialization on restart.
Diffstat (limited to 'src/libserver/cfg_utils.c')
-rw-r--r-- | src/libserver/cfg_utils.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libserver/cfg_utils.c b/src/libserver/cfg_utils.c index f7285d5ed..ed764a9ef 100644 --- a/src/libserver/cfg_utils.c +++ b/src/libserver/cfg_utils.c @@ -330,7 +330,9 @@ rspamd_config_defaults (struct rspamd_config *cfg) cfg->max_diff = 20480; cfg->metrics = g_hash_table_new (rspamd_str_hash, rspamd_str_equal); - cfg->c_modules = g_hash_table_new (rspamd_str_hash, rspamd_str_equal); + if (cfg->c_modules == NULL) { + cfg->c_modules = g_hash_table_new (rspamd_str_hash, rspamd_str_equal); + } cfg->composite_symbols = g_hash_table_new (rspamd_str_hash, rspamd_str_equal); cfg->classifiers_symbols = g_hash_table_new (rspamd_str_hash, @@ -354,7 +356,6 @@ rspamd_config_free (struct rspamd_config *cfg) ucl_obj_unref (cfg->rcl_obj); g_hash_table_remove_all (cfg->metrics); g_hash_table_unref (cfg->metrics); - g_hash_table_remove_all (cfg->c_modules); g_hash_table_unref (cfg->c_modules); g_hash_table_remove_all (cfg->composite_symbols); g_hash_table_unref (cfg->composite_symbols); |