From: Erik Hovland Date: Sun, 15 Mar 2009 13:24:03 +0000 (+0100) Subject: The file handle will leak if fread fails X-Git-Tag: mutt-1-5-20-rel~182 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=20be181cb999876ba7dabdbf808309aeca9e6f53;p=mutt The file handle will leak if fread fails --- diff --git a/alias.c b/alias.c index 1de2bf4e..2b9d701b 100644 --- a/alias.c +++ b/alias.c @@ -359,6 +359,7 @@ retry_name: if (fread(buf, 1, 1, rc) != 1) { mutt_perror (_("Error reading alias file")); + safe_fclose (&rc); return; } if (fseek (rc, 0, SEEK_END) < 0)