From: Vsevolod Stakhov Date: Thu, 10 Sep 2020 13:07:28 +0000 (+0100) Subject: [Minor] Deinit libs in client X-Git-Tag: 2.6~65 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f6d8cb00f91907d13d9a8f7aed49f8525dcef399;p=rspamd.git [Minor] Deinit libs in client --- diff --git a/src/client/rspamc.c b/src/client/rspamc.c index 99bff19c8..c2dd3a5d2 100644 --- a/src/client/rspamc.c +++ b/src/client/rspamc.c @@ -1933,7 +1933,7 @@ main (gint argc, gchar **argv, gchar **env) } } - rspamd_init_libs (); + struct rspamd_external_libs_ctx *libs = rspamd_init_libs (); event_loop = ev_loop_new (EVBACKEND_ALL); struct rspamd_http_context_cfg http_config; @@ -2087,6 +2087,8 @@ main (gint argc, gchar **argv, gchar **env) g_pattern_spec_free (exclude_compiled[i]); } + rspamd_deinit_libs (libs); + /* Mix retcode (return from Rspamd side) and ret (return from subprocess) */ return ret | retcode; } diff --git a/src/plugins/fuzzy_check.c b/src/plugins/fuzzy_check.c index b898ff2b2..6211b22f1 100644 --- a/src/plugins/fuzzy_check.c +++ b/src/plugins/fuzzy_check.c @@ -1653,7 +1653,7 @@ fuzzy_cmd_from_text_part (struct rspamd_task *task, } } else { - cached = rspamd_mempool_alloc (task->task_pool, sizeof (*cached)); + cached = rspamd_mempool_alloc0 (task->task_pool, sizeof (*cached)); additional_length = fuzzy_cmd_extension_length (task, rule); cached->additional_length = additional_length;