From: Thomas Roessler Date: Mon, 15 Jan 2001 10:40:44 +0000 (+0000) Subject: Use safe_fclose() where a NULL pointer may be passed to fclose(). X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=10314741c279f268f2ff1a311adfcb27a05e1a2a;p=neomutt Use safe_fclose() where a NULL pointer may be passed to fclose(). --- diff --git a/send.c b/send.c index e5fc64252..b96ae5a0b 100644 --- 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;