diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-05-02 12:31:10 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-05-02 12:31:10 +0100 |
commit | ffe52ffb1f0f5250292d24e0da4a0f22c0ed488b (patch) | |
tree | 0b58b8a81ac36726fdee0221ab9a5c5807a4c9e5 /src/libserver/cfg_utils.c | |
parent | d71409c68eef6eadf741537d145ab022f255203b (diff) | |
download | rspamd-ffe52ffb1f0f5250292d24e0da4a0f22c0ed488b.tar.gz rspamd-ffe52ffb1f0f5250292d24e0da4a0f22c0ed488b.zip |
[Rework] Make log pipes worker agnostic, add scanners API
Diffstat (limited to 'src/libserver/cfg_utils.c')
-rw-r--r-- | src/libserver/cfg_utils.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libserver/cfg_utils.c b/src/libserver/cfg_utils.c index e8abcd9e6..354e9f082 100644 --- a/src/libserver/cfg_utils.c +++ b/src/libserver/cfg_utils.c @@ -191,6 +191,7 @@ void rspamd_config_free (struct rspamd_config *cfg) { struct rspamd_config_post_load_script *sc, *sctmp; + struct rspamd_worker_log_pipe *lp, *ltmp; rspamd_map_remove_all (cfg); @@ -244,6 +245,12 @@ rspamd_config_free (struct rspamd_config *cfg) rspamd_mempool_delete (cfg->cfg_pool); lua_close (cfg->lua_state); REF_RELEASE (cfg->libs_ctx); + + DL_FOREACH_SAFE (cfg->log_pipes, lp, ltmp) { + close (lp->fd); + g_slice_free1 (sizeof (*lp), lp); + } + g_slice_free1 (sizeof (*cfg), cfg); } |