X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/b698d5cd157d035658009158aa44a05bc4a01124..843bc850b2b7732c8969b9ad25e922fb09eaf4b3:/uip/mhfixmsg.c diff --git a/uip/mhfixmsg.c b/uip/mhfixmsg.c index 0cf8fe6f..a820c638 100644 --- a/uip/mhfixmsg.c +++ b/uip/mhfixmsg.c @@ -551,6 +551,11 @@ main (int argc, char **argv) (void) m_backup (file); } } + if (outfp) { + /* close fp opened by the m_mktemp2() call in mhfixmsgsbr() */ + fclose (outfp); + outfp = NULL; + } } } else { status = 1; @@ -2740,22 +2745,19 @@ convert_charsets (CT ct, char *dest_charset, int *message_mods) switch (ct->c_type) { case CT_TEXT: if (ct->c_subtype == TEXT_PLAIN) { + char *const ct_charset = content_charset (ct); + status = convert_charset (ct, dest_charset, message_mods); if (status == OK) { if (verbosw) { - char *ct_charset = content_charset (ct); - report (NULL, ct->c_partno, ct->c_file, "convert %s to %s", ct_charset, dest_charset); - free (ct_charset); } } else { - char *ct_charset = content_charset (ct); - report ("iconv", ct->c_partno, ct->c_file, "failed to convert %s to %s", ct_charset, dest_charset); - free (ct_charset); } + free (ct_charset); } break;