]> granicus.if.org Git - neomutt/commitdiff
Use safe_fclose() where a NULL pointer may be passed to fclose().
authorThomas Roessler <roessler@does-not-exist.org>
Mon, 15 Jan 2001 10:40:44 +0000 (10:40 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Mon, 15 Jan 2001 10:40:44 +0000 (10:40 +0000)
send.c

diff --git a/send.c b/send.c
index e5fc642528d8d3930ff331003ba0c01de31befbd..b96ae5a0b722358b1795a9df8079e3eefaa7aaaa 100644 (file)
--- a/send.c
+++ b/send.c
@@ -1218,24 +1218,9 @@ ci_send_message (int flags,              /* send mode */
 
 
 #ifdef HAVE_PGP
-  
-  if (! (flags & SENDKEY) && tempfp)
-  {
-
-#endif
-    
-
-
-    fclose (tempfp);
-    tempfp = NULL;
-    
-
-
-#ifdef HAVE_PGP
-    
-  }
-
+  if (! (flags & SENDKEY))
 #endif
+    safe_fclose (&tempfp);
 
 
 
@@ -1604,8 +1589,7 @@ cleanup:
   }
 #endif /* HAVE_PGP */
    
-  if (tempfp)
-    fclose (tempfp);
+  safe_fclose (&tempfp);
   mutt_free_header (&msg);
   
   return rv;