Use m_tempfile and better errors msg
[apps/madmutt.git] / handler.c
index 0f37639..59c70de 100644 (file)
--- a/handler.c
+++ b/handler.c
@@ -1415,7 +1415,7 @@ int mutt_body_handler (BODY * b, STATE * s)
       if (decode) {
         b->length = ftello (s->fpout);
         b->offset = 0;
-        fclose (s->fpout);
+        m_fclose(&s->fpout);
 
         /* restore final destination and substitute the tempfile for input */
         s->fpout = fp;
@@ -1439,7 +1439,7 @@ int mutt_body_handler (BODY * b, STATE * s)
         b->offset = tmpoffset;
 
         /* restore the original source stream */
-        fclose (s->fpin);
+        m_fclose(&s->fpin);
         s->fpin = fp;
       }
     }