From: Kevin McCarthy Date: Fri, 5 Aug 2016 20:43:04 +0000 (-0700) Subject: Fix memory leak in mutt_choose_charset(). X-Git-Tag: mutt-1-7-rel~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=85decb85c2e88cbaecc0dbcf486f899add7ed595;p=mutt Fix memory leak in mutt_choose_charset(). --- diff --git a/rfc2047.c b/rfc2047.c index 505cc910..c566bfcf 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) {