]> granicus.if.org Git - mutt/commitdiff
Fix memory leak in mutt_choose_charset().
authorKevin McCarthy <kevin@8t8.us>
Fri, 5 Aug 2016 20:43:04 +0000 (13:43 -0700)
committerKevin McCarthy <kevin@8t8.us>
Fri, 5 Aug 2016 20:43:04 +0000 (13:43 -0700)
rfc2047.c

index 505cc910d7c61037a04c488d4f748bfdaffbd710..c566bfcf08947afb634946c013540a630f14c838 100644 (file)
--- 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)
     {