Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
line-log.c: fix a memleak
author
Stefan Beller
<sbeller@google.com>
Tue, 31 Mar 2015 01:22:07 +0000
(18:22 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Tue, 31 Mar 2015 04:59:57 +0000
(21:59 -0700)
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>
line-log.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
b260d26
)
diff --git
a/line-log.c
b/line-log.c
index b7864ad5869eb076e778c352e2f64666dc77a525..e13455fd31cfd9f58ee73da113b2a517f69937bc 100644
(file)
--- 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;