summaryrefslogtreecommitdiffstats
path: root/headers.c
diff options
context:
space:
mode:
authorRocco Rutte <pdmef@gmx.net>2009-03-15 13:46:52 +0100
committerRocco Rutte <pdmef@gmx.net>2009-03-15 13:46:52 +0100
commit8cfd92192fbe9b2c17fdc2b262592a486025d0ff (patch)
tree6fa88dcb48254bd3d5a6492eb7889671482592db /headers.c
parent06d425398e3ef6fd3b152d95f6def1b4b14ff43e (diff)
Use safe_fclose() instead of fclose(), add fclose() to check_sec.sh
Diffstat (limited to 'headers.c')
-rw-r--r--headers.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/headers.c b/headers.c
index 8d4a3aa5..7a102b05 100644
--- a/headers.c
+++ b/headers.c
@@ -64,8 +64,8 @@ void mutt_edit_headers (const char *editor,
mutt_copy_stream (ifp, ofp);
- fclose (ifp);
- fclose (ofp);
+ safe_fclose (&ifp);
+ safe_fclose (&ofp);
if (stat (path, &st) == -1)
{
@@ -98,7 +98,7 @@ void mutt_edit_headers (const char *editor,
if ((ofp = safe_fopen (body, "w")) == NULL)
{
/* intentionally leak a possible temporary file here */
- fclose (ifp);
+ safe_fclose (&ifp);
mutt_perror (body);
return;
}
@@ -106,8 +106,8 @@ void mutt_edit_headers (const char *editor,
n = mutt_read_rfc822_header (ifp, NULL, 1, 0);
while ((i = fread (buffer, 1, sizeof (buffer), ifp)) > 0)
fwrite (buffer, 1, i, ofp);
- fclose (ofp);
- fclose (ifp);
+ safe_fclose (&ofp);
+ safe_fclose (&ifp);
mutt_unlink (path);
/* restore old info. */