diff options
-rw-r--r-- | src/main.c | 6 | ||||
m--------- | src/rdns | 0 | ||||
m--------- | src/ucl | 0 |
3 files changed, 2 insertions, 4 deletions
diff --git a/src/main.c b/src/main.c index 1c8f7fd41..728134132 100644 --- a/src/main.c +++ b/src/main.c @@ -1051,10 +1051,9 @@ main (gint argc, gchar **argv, gchar **env) #if ((GLIB_MAJOR_VERSION == 2) && (GLIB_MINOR_VERSION <= 30)) g_thread_init (NULL); #endif - rspamd_main = (struct rspamd_main *)g_malloc (sizeof (struct rspamd_main)); - memset (rspamd_main, 0, sizeof (struct rspamd_main)); + rspamd_main = (struct rspamd_main *)g_malloc0 (sizeof (struct rspamd_main)); rspamd_main->server_pool = rspamd_mempool_new (rspamd_mempool_suggest_size ()); - rspamd_main->cfg = (struct rspamd_config *)g_malloc (sizeof (struct rspamd_config)); + rspamd_main->cfg = (struct rspamd_config *)g_malloc0 (sizeof (struct rspamd_config)); if (!rspamd_main || !rspamd_main->cfg) { fprintf (stderr, "Cannot allocate memory\n"); @@ -1068,7 +1067,6 @@ main (gint argc, gchar **argv, gchar **env) rspamd_main->stat = rspamd_mempool_alloc_shared (rspamd_main->server_pool, sizeof (struct rspamd_stat)); memset (rspamd_main->stat, 0, sizeof (struct rspamd_stat)); - memset (rspamd_main->cfg, 0, sizeof (struct rspamd_config)); rspamd_main->cfg->cfg_pool = rspamd_mempool_new (rspamd_mempool_suggest_size ()); rspamd_config_defaults (rspamd_main->cfg); diff --git a/src/rdns b/src/rdns -Subproject 27f4808313ecfe37fbfffca91b7269e23e78d2d +Subproject a7f457e2548cfb8f5c6199aa0ed2e9486171710 diff --git a/src/ucl b/src/ucl -Subproject 80ec7720f562baccc9d0205ca2fa54d70549a2e +Subproject 0375252cb9ca2e0095ff49139170a2d35475779 |