OSDN Git Service
(root)
/
git-core
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3d59405
)
archive - leakfix for format_subst()
author
Junio C Hamano
<gitster@pobox.com>
Mon, 10 Sep 2007 07:14:38 +0000
(
00:14
-0700)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 10 Sep 2007 07:14:38 +0000
(
00:14
-0700)
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-archive.c
patch
|
blob
|
history
diff --git
a/builtin-archive.c
b/builtin-archive.c
index
e221f11
..
a90c65c
100644
(file)
--- a/
builtin-archive.c
+++ b/
builtin-archive.c
@@
-108,6
+108,7
@@
static void *format_subst(const struct commit *commit, const char *format,
formatted_len = format_commit_message(commit, fmt, &formatted,
&allocated);
+ free(fmt);
result = xrealloc(result, result_len + a_len + formatted_len);
memcpy(result + result_len, a, a_len);
memcpy(result + result_len + a_len, formatted, formatted_len);