From 3c6829656593b2fac53e09d0c34452ba1de9965d Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 15 Jun 2018 14:01:38 +0100 Subject: [PATCH] [Minor] Fix leak in dynamic cfg init --- src/libserver/dynamic_cfg.c | 3 +++ 1 file changed, 3 insertions(+) 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, -- 2.39.5