summaryrefslogtreecommitdiff
path: root/line-log.c
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2015-03-30 18:22:07 -0700
committerJunio C Hamano <gitster@pobox.com>2015-03-30 21:59:57 -0700
commit05bfc7dcaa0e99e045c326e2887dba24e58266d8 (patch)
tree3038424c8e2319fc6089a531fc1782029bf82d73 /line-log.c
parentb260d265e189728b26e50506ac6ffab6a7d588da (diff)
downloadgit-05bfc7dcaa0e99e045c326e2887dba24e58266d8.tar.gz
line-log.c: fix a memleaksb/line-log-plug-pairdiff-leak
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 <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'line-log.c')
-rw-r--r--line-log.c1
1 files changed, 1 insertions, 0 deletions
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;