summaryrefslogtreecommitdiff
path: root/pith/mailview.c
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2018-06-16 17:37:24 -0600
committerEduardo Chappa <chappa@washington.edu>2018-06-16 17:37:24 -0600
commit702a71b7cd83ad8881bce5d996bff7a86e35b117 (patch)
treecde02f7f904dd7c8e5dac3152c5f2a189e4b4e95 /pith/mailview.c
parent19dfafb6bc3ed0d37036f21813b753a4dca91e52 (diff)
downloadalpine-702a71b7cd83ad8881bce5d996bff7a86e35b117.tar.xz
* Clear up some memory so that valgrind does not complain.
Diffstat (limited to 'pith/mailview.c')
-rw-r--r--pith/mailview.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pith/mailview.c b/pith/mailview.c
index c438371c..a0aead24 100644
--- a/pith/mailview.c
+++ b/pith/mailview.c
@@ -609,12 +609,13 @@ format_body(long int msgno, BODY *body, HANDLE_S **handlesp, HEADER_S *hp, int f
&& body->nested.part->body.type == TYPETEXT)
charset = parameter_val(body->nested.part->body.parameter, "charset");
else
- charset = ps_global->display_charmap;
+ charset = cpystr(ps_global->display_charmap);
if(strucmp(charset, "us-ascii") && strucmp(charset, "utf-8")){
/* transliterate message text to UTF-8 */
gf_link_filter(gf_utf8, gf_utf8_opt(charset));
}
+ if (charset) fs_give((void **) &charset);
/* link in filters, similar to what is done in decode_text() */
if(!ps_global->pass_ctrl_chars){