aboutsummaryrefslogtreecommitdiffstats
path: root/em-format/e-mail-formatter-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'em-format/e-mail-formatter-utils.c')
-rw-r--r--em-format/e-mail-formatter-utils.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/em-format/e-mail-formatter-utils.c b/em-format/e-mail-formatter-utils.c
index 5fdb885e9a..a2e0d43ff1 100644
--- a/em-format/e-mail-formatter-utils.c
+++ b/em-format/e-mail-formatter-utils.c
@@ -299,19 +299,21 @@ e_mail_formatter_format_header (EMailFormatter *formatter,
struct _camel_header_address *addrs;
GString *html;
gchar *img;
- const gchar *charset;
+ gchar *charset;
- charset = e_mail_formatter_get_charset (formatter);
+ charset = e_mail_formatter_dup_charset (formatter);
if (charset == NULL)
- charset = e_mail_formatter_get_default_charset (formatter);
+ charset = e_mail_formatter_dup_default_charset (formatter);
buf = camel_header_unfold (header->value);
addrs = camel_header_address_decode (buf, charset);
if (addrs == NULL) {
+ g_free (charset);
g_free (buf);
return;
}
+ g_free (charset);
g_free (buf);
html = g_string_new ("");