res = mutt_copy_message (fpout, Context, cur, cmflags,
(option (OPTWEED) ? (CH_WEED | CH_REORDER) : 0) | CH_DECODE | CH_FROM);
- if ((fclose (fpout) != 0 && errno != EPIPE) || res == -1)
+ if ((safe_fclose (&fpout) != 0 && errno != EPIPE) || res == -1)
{
mutt_error (_("Could not copy message"));
if (fpfilterout != NULL)
+ {
mutt_wait_filter (filterpid);
+ safe_fclose (&fpfilterout);
+ }
mutt_unlink (tempfile);
return 0;
}
if (fpfilterout != NULL && mutt_wait_filter (filterpid) != 0)
mutt_any_key_to_continue (NULL);
+ safe_fclose (&fpfilterout); /* XXX - check result? */
+
+
#if defined(HAVE_PGP) || defined(HAVE_SMIME)
/* update crypto information for this message */
cur->security |= crypt_query (cur->content);