From: Vsevolod Stakhov Date: Sun, 7 May 2017 13:20:29 +0000 (+0100) Subject: [CritFix] Fix memory leak in fuzzy check X-Git-Tag: 1.6.0~256 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=67e0b6631eff42cff194768a1d15d4eff92e179e;p=rspamd.git [CritFix] Fix memory leak in fuzzy check --- diff --git a/src/plugins/fuzzy_check.c b/src/plugins/fuzzy_check.c index 2240ac53b..dbf88e54f 100644 --- a/src/plugins/fuzzy_check.c +++ b/src/plugins/fuzzy_check.c @@ -2396,7 +2396,8 @@ fuzzy_generate_commands (struct rspamd_task *task, struct fuzzy_rule *rule, #endif end: if (res->len == 0) { - g_ptr_array_free (res, FALSE); + g_ptr_array_free (res, TRUE); + return NULL; }