]> source.dussan.org Git - rspamd.git/commitdiff
Allocate and free memory with the same allocator.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 29 Sep 2015 11:38:35 +0000 (12:38 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 29 Sep 2015 11:38:35 +0000 (12:38 +0100)
Issue: #385

src/rspamadm/rspamadm.c

index be35a8be2c98eaa25e6a98b1f601a7aec8c3198c..80c1801023a4a768d79111b509083cbe92db0d39 100644 (file)
@@ -203,8 +203,8 @@ main (gint argc, gchar **argv, gchar **env)
                rspamd_strcase_equal, g_free, g_free);
        ottery_init (NULL);
        process_quark = g_quark_from_static_string ("rspamadm");
-       cfg = g_slice_alloc0 (sizeof (*cfg));
-       rspamd_main = g_slice_alloc0 (sizeof (*rspamd_main));
+       cfg = g_malloc0 (sizeof (*cfg));
+       rspamd_main = g_malloc0 (sizeof (*rspamd_main));
        rspamd_init_libs ();
        rspamd_init_cfg (cfg, TRUE);
        rspamd_main->cfg = cfg;