Browse Source

[Minor] Fix another deinit race

tags/1.9.0
Vsevolod Stakhov 5 years ago
parent
commit
3089d894c5
4 changed files with 9 additions and 4 deletions
  1. 3
    1
      src/controller.c
  2. 2
    1
      src/fuzzy_storage.c
  3. 2
    1
      src/rspamd_proxy.c
  4. 2
    1
      src/worker.c

+ 3
- 1
src/controller.c View File

@@ -3942,8 +3942,10 @@ start_controller_worker (struct rspamd_worker *worker)

g_hash_table_unref (ctx->plugins);
g_hash_table_unref (ctx->custom_commands);

struct rspamd_http_context *http_ctx = ctx->http_ctx;
REF_RELEASE (ctx->cfg);
rspamd_http_context_free (ctx->http_ctx);
rspamd_http_context_free (http_ctx);
rspamd_log_close (worker->srv->logger, TRUE);

exit (EXIT_SUCCESS);

+ 2
- 1
src/fuzzy_storage.c View File

@@ -3235,8 +3235,9 @@ start_fuzzy (struct rspamd_worker *worker)
rspamd_keypair_cache_destroy (ctx->keypair_cache);
}

struct rspamd_http_context *http_ctx = ctx->http_ctx;
REF_RELEASE (ctx->cfg);
rspamd_http_context_free (ctx->http_ctx);
rspamd_http_context_free (http_ctx);
rspamd_log_close (worker->srv->logger, TRUE);

exit (EXIT_SUCCESS);

+ 2
- 1
src/rspamd_proxy.c View File

@@ -2213,8 +2213,9 @@ start_rspamd_proxy (struct rspamd_worker *worker)
rspamd_stat_close ();
}

struct rspamd_http_context *http_ctx = ctx->http_ctx;
REF_RELEASE (ctx->cfg);
rspamd_http_context_free (ctx->http_ctx);
rspamd_http_context_free (http_ctx);
rspamd_log_close (worker->srv->logger, TRUE);

exit (EXIT_SUCCESS);

+ 2
- 1
src/worker.c View File

@@ -703,8 +703,9 @@ start_worker (struct rspamd_worker *worker)
rspamd_worker_block_signals ();

rspamd_stat_close ();
struct rspamd_http_context *http_ctx = ctx->http_ctx;
REF_RELEASE (ctx->cfg);
rspamd_http_context_free (ctx->http_ctx);
rspamd_http_context_free (http_ctx);
rspamd_log_close (worker->srv->logger, TRUE);

exit (EXIT_SUCCESS);

Loading…
Cancel
Save