From 5e59527bb11dfd2e5a9c439c6957cf6e9df57256 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 4 Apr 2017 11:46:56 +0100 Subject: [PATCH] [Minor] Explicitly set queue to NULL for top part --- src/libmime/mime_parser.c | 1 + src/libserver/task.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/libmime/mime_parser.c b/src/libmime/mime_parser.c index 9b245e35a..bcec5aa54 100644 --- a/src/libmime/mime_parser.c +++ b/src/libmime/mime_parser.c @@ -1074,6 +1074,7 @@ rspamd_mime_parse_message (struct rspamd_task *task, pbegin = st->start + body_pos; plen = st->end - pbegin; npart->raw_headers = g_hash_table_ref (task->raw_headers); + npart->headers_order = NULL; } else { str.str = (gchar *)part->parsed_data.begin; diff --git a/src/libserver/task.c b/src/libserver/task.c index d2313afd7..95e682eed 100644 --- a/src/libserver/task.c +++ b/src/libserver/task.c @@ -212,7 +212,9 @@ rspamd_task_free (struct rspamd_task *task) g_hash_table_unref (p->raw_headers); } - g_queue_free (p->headers_order); + if (p->headers_order) { + g_queue_free (p->headers_order); + } if (IS_CT_MULTIPART (p->ct)) { if (p->specific.mp.children) { -- 2.39.5