From: Stefan Beller Date: Tue, 31 Mar 2015 01:22:07 +0000 (-0700) Subject: line-log.c: fix a memleak X-Git-Tag: v2.4.1~1^2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/05bfc7dcaa0e99e045c326e2887dba24e58266d8 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 Signed-off-by: Junio C Hamano --- diff --git a/line-log.c b/line-log.c index b7864ad586..e13455fd31 100644 --- a/line-log.c +++ b/line-log.c @@ -1099,6 +1099,7 @@ static int process_all_files(struct line_log_data **range_out, rg->pair = diff_filepair_dup(queue->queue[i]); memcpy(&rg->diff, pairdiff, sizeof(struct diff_ranges)); } + free(pairdiff); } return changed;