mutt_*mktemp--
[apps/madmutt.git] / copy.c
diff --git a/copy.c b/copy.c
index 8310f6f..d386400 100644 (file)
--- a/copy.c
+++ b/copy.c
 #include <lib-lib/lib-lib.h>
 
 #include <lib-mime/mime.h>
+#include <lib-mx/mx.h>
 
 #include "mutt.h"
 #include "handler.h"
-#include "mx.h"
 #include "copy.h"
 #include <lib-crypt/crypt.h>
 #include <lib-ui/curses.h>
@@ -616,12 +616,12 @@ _mutt_copy_message (FILE * fpout, FILE * fpin, HEADER * hdr, BODY * body,
 
     fseeko (fp, cur->offset, 0);
     if (mutt_copy_bytes (fp, fpout, cur->length) == -1) {
-      fclose (fp);
+      m_fclose(&fp);
       body_list_wipe(&cur);
       return (-1);
     }
     body_list_wipe(&cur);
-    fclose (fp);
+    m_fclose(&fp);
   }
   else {
     fseeko (fpin, body->offset, 0);