diff options
Diffstat (limited to 'src/plugins/regexp.c')
-rw-r--r-- | src/plugins/regexp.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/plugins/regexp.c b/src/plugins/regexp.c index dcbdce7b6..d8d9f3ea8 100644 --- a/src/plugins/regexp.c +++ b/src/plugins/regexp.c @@ -312,10 +312,10 @@ process_regexp (struct rspamd_regexp *re, struct worker_task *task) return 0; } else { + memory_pool_add_destructor (task->task_pool, (pool_destruct_func)g_list_free, headerlist); if (re->regexp == NULL) { msg_debug ("process_regexp: regexp contains only header and it is found %s", re->header); task_cache_add (task, re, 1); - g_list_free (headerlist); return 1; } cur = headerlist; @@ -327,7 +327,6 @@ process_regexp (struct rspamd_regexp *re, struct worker_task *task) } cur = g_list_next (cur); } - g_list_free (headerlist); task_cache_add (task, re, 0); return 0; } |