From: Rene Scharfe Date: Wed, 30 Aug 2017 18:20:17 GMT Subject: [PATCH 33/34] wt-status: release strbuf after use in read_rebase_todolist() Message-ID: <20170830182017.21350-1-l.s.r@web.de> In-Reply-To: <20170830175005.20756-1-l.s.r@web.de> Signed-off-by: Rene Scharfe --- 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