diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-06-15 14:01:38 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-06-15 14:01:38 +0100 |
commit | 3c6829656593b2fac53e09d0c34452ba1de9965d (patch) | |
tree | 835c88f19c4738002aafe7a772a163245266013d /src/libserver/dynamic_cfg.c | |
parent | fc70ff1216b5274dcbb2d596373d3b97d1e91683 (diff) | |
download | rspamd-3c6829656593b2fac53e09d0c34452ba1de9965d.tar.gz rspamd-3c6829656593b2fac53e09d0c34452ba1de9965d.zip |
[Minor] Fix leak in dynamic cfg init
Diffstat (limited to 'src/libserver/dynamic_cfg.c')
-rw-r--r-- | src/libserver/dynamic_cfg.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libserver/dynamic_cfg.c b/src/libserver/dynamic_cfg.c index 17818888e..55275cba4 100644 --- a/src/libserver/dynamic_cfg.c +++ b/src/libserver/dynamic_cfg.c @@ -259,6 +259,9 @@ init_dynamic_config (struct rspamd_config *cfg) jb->cfg = cfg; *pjb = jb; cfg->current_dynamic_conf = ucl_object_typed_new (UCL_ARRAY); + rspamd_mempool_add_destructor (cfg->cfg_pool, + (rspamd_mempool_destruct_t)ucl_object_unref, + cfg->current_dynamic_conf); if (!rspamd_map_add (cfg, cfg->dynamic_conf, |