From: Kevin McCarthy Date: Fri, 5 Aug 2016 20:43:04 +0000 (-0700) Subject: Fix memory leak in mutt_choose_charset(). X-Git-Tag: neomutt-20160822~59 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5a8c47464ec7c4f3c56501732f26d67c6e1817d9;p=neomutt Fix memory leak in mutt_choose_charset(). --- diff --git a/rfc2047.c b/rfc2047.c index 505cc910d..c566bfcf0 100644 --- a/rfc2047.c +++ b/rfc2047.c @@ -153,7 +153,10 @@ char *mutt_choose_charset (const char *fromcode, const char *charsets, n = convert_string (u, ulen, fromcode, t, &s, &slen); if (n == (size_t)(-1)) + { + FREE (&t); continue; + } if (!tocode || n < bestn) {