From: Vsevolod Stakhov Date: Thu, 19 Jan 2017 10:54:24 +0000 (+0000) Subject: [Fix] Fix another reload memory issue X-Git-Tag: 1.5.0~299 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b19affd0edb349a69e954b1840d6be9dadbd5e84;p=thirdparty%2Frspamd.git [Fix] Fix another reload memory issue --- diff --git a/src/plugins/fuzzy_check.c b/src/plugins/fuzzy_check.c index 804db15e62..37eeded4dd 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) {