mirror of
https://github.com/git/git.git
synced 2024-11-24 02:17:02 +08:00
archive - leakfix for format_subst()
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
3d59405ced
commit
20fbfd869f
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user