Skip to content

Commit 05bfc7d

Browse files
stefanbellergitster
authored andcommitted
line-log.c: fix a memleak
The `filepair` is assigned new memory with any iteration via process_diff_filepair, so free it before the current iteration ends. Signed-off-by: Stefan Beller <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent b260d26 commit 05bfc7d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

line-log.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1099,6 +1099,7 @@ static int process_all_files(struct line_log_data **range_out,
10991099
rg->pair = diff_filepair_dup(queue->queue[i]);
11001100
memcpy(&rg->diff, pairdiff, sizeof(struct diff_ranges));
11011101
}
1102+
free(pairdiff);
11021103
}
11031104

11041105
return changed;

0 commit comments

Comments
 (0)