Skip to content

Commit 7082da8

Browse files
brandb97gitster
authored andcommitted
commit-graph: fix start_delayed_progress() leak
In commit-graph.c:graph_write(), if read_one_commit() failed, progress allocated in start_delayed_progress() will leak. Add stop_progress() before goto cleanup. Signed-off-by: Lidong Yan <[email protected]> Acked-by: Patrick Steinhardt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent d50a5e8 commit 7082da8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

builtin/commit-graph.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,7 @@ static int graph_write(int argc, const char **argv, const char *prefix,
311311
while (strbuf_getline(&buf, stdin) != EOF) {
312312
if (read_one_commit(&commits, progress, buf.buf)) {
313313
result = 1;
314+
stop_progress(&progress);
314315
goto cleanup;
315316
}
316317
}

0 commit comments

Comments
 (0)