From 3148ef9183936dd374ae934cb53eced969ff7766 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 4 Jul 2016 13:56:30 +0100 Subject: [Minor] Adjust array size for fuzzy commands --- src/plugins/fuzzy_check.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/fuzzy_check.c') diff --git a/src/plugins/fuzzy_check.c b/src/plugins/fuzzy_check.c index 281b4d505..8ebbe68f1 100644 --- a/src/plugins/fuzzy_check.c +++ b/src/plugins/fuzzy_check.c @@ -1993,7 +1993,7 @@ fuzzy_generate_commands (struct rspamd_task *task, struct fuzzy_rule *rule, guint i; GPtrArray *res; - res = g_ptr_array_new (); + res = g_ptr_array_sized_new (task->parts->len + 1); if (c == FUZZY_STAT) { io = fuzzy_cmd_stat (rule, c, flag, value, task->task_pool); -- cgit v1.2.3