Browse Source

[Fix] Plug reload leaks

tags/1.5.0
Vsevolod Stakhov 7 years ago
parent
commit
7672a0ae2e
5 changed files with 9 additions and 5 deletions
  1. 2
    1
      src/controller.c
  2. 2
    1
      src/fuzzy_storage.c
  3. 1
    1
      src/hs_helper.c
  4. 2
    1
      src/rspamd_proxy.c
  5. 2
    1
      src/worker.c

+ 2
- 1
src/controller.c View File

@@ -3051,7 +3051,8 @@ init_controller_worker (struct rspamd_config *cfg)

type = g_quark_try_string ("controller");

ctx = g_malloc0 (sizeof (struct rspamd_controller_worker_ctx));
ctx = rspamd_mempool_alloc0 (cfg->cfg_pool,
sizeof (struct rspamd_controller_worker_ctx));

ctx->magic = rspamd_controller_ctx_magic;
ctx->timeout = DEFAULT_WORKER_IO_TIMEOUT;

+ 2
- 1
src/fuzzy_storage.c View File

@@ -2021,7 +2021,8 @@ init_fuzzy (struct rspamd_config *cfg)

type = g_quark_try_string ("fuzzy");

ctx = g_malloc0 (sizeof (struct rspamd_fuzzy_storage_ctx));
ctx = rspamd_mempool_alloc0 (cfg->cfg_pool,
sizeof (struct rspamd_fuzzy_storage_ctx));

ctx->magic = rspamd_fuzzy_storage_magic;
ctx->sync_timeout = DEFAULT_SYNC_TIMEOUT;

+ 1
- 1
src/hs_helper.c View File

@@ -62,7 +62,7 @@ init_hs_helper (struct rspamd_config *cfg)
GQuark type;

type = g_quark_try_string ("hs_helper");
ctx = g_malloc0 (sizeof (*ctx));
ctx = rspamd_mempool_alloc0 (cfg->cfg_pool, sizeof (*ctx));

ctx->magic = rspamd_hs_helper_magic;
ctx->cfg = cfg;

+ 2
- 1
src/rspamd_proxy.c View File

@@ -620,7 +620,8 @@ init_rspamd_proxy (struct rspamd_config *cfg)

type = g_quark_try_string ("rspamd_proxy");

ctx = g_malloc0 (sizeof (struct rspamd_proxy_ctx));
ctx = rspamd_mempool_alloc (cfg->cfg_pool,
sizeof (struct rspamd_proxy_ctx));
ctx->magic = rspamd_rspamd_proxy_magic;
ctx->timeout = 10.0;
ctx->upstreams = g_hash_table_new (rspamd_strcase_hash, rspamd_strcase_equal);

+ 2
- 1
src/worker.c View File

@@ -488,7 +488,8 @@ init_worker (struct rspamd_config *cfg)

type = g_quark_try_string ("normal");

ctx = g_malloc0 (sizeof (struct rspamd_worker_ctx));
ctx = rspamd_mempool_alloc (cfg->cfg_pool,
sizeof (struct rspamd_worker_ctx));

ctx->magic = rspamd_worker_magic;
ctx->is_mime = TRUE;

Loading…
Cancel
Save