- if (!mutt_convert_string (&t, Charset, "UTF-8", 0))
- utf8_to_utf7 (t, str_len (t), s, 0);
- FREE (&t);
+ if (!mutt_convert_string (&t, Charset, "UTF-8", 0)) {
+ char *u7 = utf8_to_utf7 (t, strlen (t), NULL, 0);
+ mem_free (s);
+ *s = u7;
+ }
+ mem_free (&t);