]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix another deinit race
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 26 Feb 2019 16:29:45 +0000 (16:29 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 26 Feb 2019 16:29:45 +0000 (16:29 +0000)
src/controller.c
src/fuzzy_storage.c
src/rspamd_proxy.c
src/worker.c

index 87ac965ec98a96308a53975fc98ae126b6f7194f..ac1acae81cf2b2e44fbbd38de020366aada0cca4 100644 (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);
index 50a99f030a81120452de9be0b2bfecc130067967..7fdce82ae704844d8cf3a7fc62ed46c3cf86cc88 100644 (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);
index 4add6cc2252bc9d92c8ab9642be4900c3c961e4c..b6ede29b960b73b628beb74f1da54ac3068b7462 100644 (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);
index 920ee7f72a8b634450570bcd7f54603892b455d6..d81be54a15e6df8db1b27151c013662b0e207310 100644 (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);