From b19affd0edb349a69e954b1840d6be9dadbd5e84 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 19 Jan 2017 10:54:24 +0000 Subject: [PATCH] [Fix] Fix another reload memory issue --- src/plugins/fuzzy_check.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/plugins/fuzzy_check.c b/src/plugins/fuzzy_check.c index 804db15e6..37eeded4d 100644 --- a/src/plugins/fuzzy_check.c +++ b/src/plugins/fuzzy_check.c @@ -242,8 +242,6 @@ parse_mime_types (const gchar *str) strvec = g_strsplit_set (str, ",", 0); num = g_strv_length (strvec); res = g_ptr_array_sized_new (num); - rspamd_mempool_add_destructor (fuzzy_module_ctx->fuzzy_pool, - rspamd_ptr_array_free_hard, res); for (i = 0; i < num; i++) { g_strstrip (strvec[i]); @@ -417,6 +415,11 @@ fuzzy_parse_rule (struct rspamd_config *cfg, const ucl_object_t *obj, } } } + + if (rule->mime_types) { + rspamd_mempool_add_destructor (fuzzy_module_ctx->fuzzy_pool, + rspamd_ptr_array_free_hard, rule->mime_types); + } } if ((value = ucl_object_lookup (obj, "headers")) != NULL) { -- 2.39.5