]> source.dussan.org Git - rspamd.git/commitdiff
Add destructor for a string list to config pool.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 31 Aug 2013 13:46:30 +0000 (14:46 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 31 Aug 2013 13:46:30 +0000 (14:46 +0100)
src/cfg_rcl.c

index 562b734f5a1879d7bfcccb3c1f870c310ac8e083..6103627c157434d4f1cecee220850d1e68971fb6 100644 (file)
@@ -479,5 +479,8 @@ rspamd_rcl_parse_struct_string_list (struct config_file *cfg, rspamd_cl_object_t
                *target = g_list_prepend (*target, val);
        }
 
+       /* Add a destructor */
+       memory_pool_add_destructor (cfg->cfg_pool, (pool_destruct_func)g_list_free, *target);
+
        return TRUE;
 }