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-Tag: mutt-1-3-14-rel~10 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c7d0ac0f84ee45a36a7a19da7e02e3154c645404;p=mutt Use safe_fclose() where a NULL pointer may be passed to fclose(). --- diff --git a/send.c b/send.c index e5fc6425..b96ae5a0 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;