Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2015-03-31 04:22:07 +0300
committerJunio C Hamano <gitster@pobox.com>2015-03-31 07:59:57 +0300
commit05bfc7dcaa0e99e045c326e2887dba24e58266d8 (patch)
tree3038424c8e2319fc6089a531fc1782029bf82d73 /line-log.c
parentb260d265e189728b26e50506ac6ffab6a7d588da (diff)
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 <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;