status: close file descriptor after reading git-rebase-todo
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Thu, 4 May 2017 13:55:52 +0000 (15:55 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 8 May 2017 03:18:19 +0000 (12:18 +0900)
Reported via Coverity.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
wt-status.c
index 03754849626d1bf117e3821fb7cdffcd594f694f..0a6e16dbe0f29fbcef33539242bf36c712f79310 100644 (file)
@@ -1168,6 +1168,7 @@ static int read_rebase_todolist(const char *fname, struct string_list *lines)
                abbrev_sha1_in_line(&line);
                string_list_append(lines, line.buf);
        }
+       fclose(f);
        return 0;
 }