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



type = g_quark_try_string ("controller"); 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->magic = rspamd_controller_ctx_magic;
ctx->timeout = DEFAULT_WORKER_IO_TIMEOUT; ctx->timeout = DEFAULT_WORKER_IO_TIMEOUT;

+ 2
- 1
src/fuzzy_storage.c View File



type = g_quark_try_string ("fuzzy"); 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->magic = rspamd_fuzzy_storage_magic;
ctx->sync_timeout = DEFAULT_SYNC_TIMEOUT; ctx->sync_timeout = DEFAULT_SYNC_TIMEOUT;

+ 1
- 1
src/hs_helper.c View File

GQuark type; GQuark type;


type = g_quark_try_string ("hs_helper"); 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->magic = rspamd_hs_helper_magic;
ctx->cfg = cfg; ctx->cfg = cfg;

+ 2
- 1
src/rspamd_proxy.c View File



type = g_quark_try_string ("rspamd_proxy"); 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->magic = rspamd_rspamd_proxy_magic;
ctx->timeout = 10.0; ctx->timeout = 10.0;
ctx->upstreams = g_hash_table_new (rspamd_strcase_hash, rspamd_strcase_equal); ctx->upstreams = g_hash_table_new (rspamd_strcase_hash, rspamd_strcase_equal);

+ 2
- 1
src/worker.c View File



type = g_quark_try_string ("normal"); 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->magic = rspamd_worker_magic;
ctx->is_mime = TRUE; ctx->is_mime = TRUE;

Loading…
Cancel
Save