git.99rst.org
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
b260d26
)
line-log.c: fix a memleak
author
Stefan Beller
<redacted>
Tue, 31 Mar 2015 01:22:07 +0000
(18:22 -0700)
committer
Junio C Hamano
<redacted>
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
line-log.c
patch
|
blob
|
history
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;
git clone https://git.99rst.org/PROJECT