diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-06-16 15:04:41 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-06-16 15:04:41 +0100 |
commit | b9902dde2b8241cc52cb59e9ea99374cad6c071c (patch) | |
tree | 4879fa4e4397cc45a1fc5fca4666431980111b8a /src/libserver/cfg_utils.c | |
parent | 8bdc6fa55d56eb01cd70b11f783db60319209b11 (diff) | |
download | rspamd-b9902dde2b8241cc52cb59e9ea99374cad6c071c.tar.gz rspamd-b9902dde2b8241cc52cb59e9ea99374cad6c071c.zip |
[Minor] Allow to reinit URLs library
Diffstat (limited to 'src/libserver/cfg_utils.c')
-rw-r--r-- | src/libserver/cfg_utils.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libserver/cfg_utils.c b/src/libserver/cfg_utils.c index 6083d655f..284a40672 100644 --- a/src/libserver/cfg_utils.c +++ b/src/libserver/cfg_utils.c @@ -653,6 +653,11 @@ rspamd_config_parse_log_format (struct rspamd_config *cfg) return TRUE; } +static void +rspamd_urls_config_dtor (gpointer _unused) +{ + rspamd_url_deinit (); +} /* * Perform post load actions @@ -751,6 +756,9 @@ rspamd_config_post_load (struct rspamd_config *cfg, else { rspamd_url_init (cfg->tld_file); } + + rspamd_mempool_add_destructor (cfg->cfg_pool, rspamd_urls_config_dtor, + NULL); } init_dynamic_config (cfg); |