aboutsummaryrefslogtreecommitdiffstats
path: root/em-format/e-mail-formatter-print-headers.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2013-03-07 02:37:37 +0800
committerMilan Crha <mcrha@redhat.com>2013-03-07 02:38:19 +0800
commit0d96f08f9f0400ab9202f1dcdbaca1d891a41ac8 (patch)
tree16a25ce6707e5a61b86bedc3386e8412be764227 /em-format/e-mail-formatter-print-headers.c
parent989886007f3f69ca64e383ad6d64ef8c352f6df8 (diff)
downloadgsoc2013-evolution-0d96f08f9f0400ab9202f1dcdbaca1d891a41ac8.tar
gsoc2013-evolution-0d96f08f9f0400ab9202f1dcdbaca1d891a41ac8.tar.gz
gsoc2013-evolution-0d96f08f9f0400ab9202f1dcdbaca1d891a41ac8.tar.bz2
gsoc2013-evolution-0d96f08f9f0400ab9202f1dcdbaca1d891a41ac8.tar.lz
gsoc2013-evolution-0d96f08f9f0400ab9202f1dcdbaca1d891a41ac8.tar.xz
gsoc2013-evolution-0d96f08f9f0400ab9202f1dcdbaca1d891a41ac8.tar.zst
gsoc2013-evolution-0d96f08f9f0400ab9202f1dcdbaca1d891a41ac8.zip
Bug #690092 - Crash under format_full_headers()
Diffstat (limited to 'em-format/e-mail-formatter-print-headers.c')
-rw-r--r--em-format/e-mail-formatter-print-headers.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/em-format/e-mail-formatter-print-headers.c b/em-format/e-mail-formatter-print-headers.c
index fb19559e49..a79dfa1f70 100644
--- a/em-format/e-mail-formatter-print-headers.c
+++ b/em-format/e-mail-formatter-print-headers.c
@@ -61,7 +61,7 @@ emfpe_headers_format (EMailFormatterExtension *extension,
const gchar *buf;
gint attachments_count;
gchar *part_id_prefix;
- const GQueue *headers;
+ GQueue *headers_queue;
GQueue queue = G_QUEUE_INIT;
GList *head, *link;
@@ -76,8 +76,8 @@ emfpe_headers_format (EMailFormatterExtension *extension,
"<table border=\"0\" cellspacing=\"5\" "
"cellpadding=\"0\" class=\"printing-header\">\n");
- headers = e_mail_formatter_get_headers (formatter);
- for (link = headers->head; link != NULL; link = g_list_next (link)) {
+ headers_queue = e_mail_formatter_dup_headers (formatter);
+ for (link = headers_queue->head; link != NULL; link = g_list_next (link)) {
EMailFormatterHeader *header = link->data;
raw_header.name = header->name;
@@ -113,6 +113,8 @@ emfpe_headers_format (EMailFormatterExtension *extension,
}
}
+ g_queue_free_full (headers_queue, (GDestroyNotify) e_mail_formatter_header_free);
+
/* Get prefix of this PURI */
part_id_prefix = g_strndup (part->id, g_strrstr (part->id, ".") - part->id);