]> granicus.if.org Git - neomutt/commitdiff
The file handle will leak if fread fails
authorErik Hovland <erik@hovland.org>
Sun, 15 Mar 2009 13:24:03 +0000 (14:24 +0100)
committerErik Hovland <erik@hovland.org>
Sun, 15 Mar 2009 13:24:03 +0000 (14:24 +0100)
alias.c

diff --git a/alias.c b/alias.c
index 1de2bf4e1de45d3e1573581398fdbbd3d9630bf4..2b9d701bde036c2deacdda3f20d0581c974c2b86 100644 (file)
--- 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)