]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix leak in dynamic cfg init
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 15 Jun 2018 13:01:38 +0000 (14:01 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 15 Jun 2018 13:01:38 +0000 (14:01 +0100)
src/libserver/dynamic_cfg.c

index 17818888e5ae24d6141e11cc8e14d9056fb88bae..55275cba4f92f90338bc458d62c2f78abfc9a510 100644 (file)
@@ -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,