]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Explicitly set queue to NULL for top part
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 4 Apr 2017 10:46:56 +0000 (11:46 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 4 Apr 2017 11:06:18 +0000 (12:06 +0100)
src/libmime/mime_parser.c
src/libserver/task.c

index 9b245e35a638b616ff1dd71c48fd8a9f2105e85b..bcec5aa5404b2e223ee981c4488224871ed864a7 100644 (file)
@@ -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;
index d2313afd78a4a92cd64230d005820adfd19f8316..95e682eede87f8874ab405fac5bbf624d9f9511f 100644 (file)
@@ -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) {