Signed-off-by: Rene Scharfe <l....@web.de>
---
 wt-status.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/wt-status.c b/wt-status.c
index 77c27c5113..cafafb5ecd 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -1175,24 +1175,25 @@ static void abbrev_sha1_in_line(struct strbuf *line)
 static int read_rebase_todolist(const char *fname, struct string_list *lines)
 {
        struct strbuf line = STRBUF_INIT;
        FILE *f = fopen(git_path("%s", fname), "r");
 
        if (!f) {
                if (errno == ENOENT)
                        return -1;
                die_errno("Could not open file %s for reading",
                          git_path("%s", fname));
        }
        while (!strbuf_getline_lf(&line, f)) {
                if (line.len && line.buf[0] == comment_line_char)
                        continue;
                strbuf_trim(&line);
                if (!line.len)
                        continue;
                abbrev_sha1_in_line(&line);
                string_list_append(lines, line.buf);
        }
        fclose(f);
+       strbuf_release(&line);
        return 0;
 }
 
-- 
2.14.1

Reply via email to