diff options
author | Junio C Hamano <gitster@pobox.com> | 2007-09-10 11:14:38 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-09-10 11:14:38 +0400 |
commit | 20fbfd869fe8faae0ce4573b60b540024db7385d (patch) | |
tree | 7746b704f0f3f05c0f28f41ef1ce488c2f02424b | |
parent | 3d59405ced89450fa443b64203a8bd9e34d4014c (diff) |
archive - leakfix for format_subst()
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r-- | builtin-archive.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/builtin-archive.c b/builtin-archive.c index e221f115f9..a90c65ce54 100644 --- 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); |