зеркало из https://github.com/microsoft/git.git
commit: fix memory leak in `reduce_heads()`
We don't free the temporary scratch space we use with `remove_redundant()`. Free it similar to how we do it in `get_merge_bases_many_0()`. Signed-off-by: Martin Ågren <martin.agren@gmail.com> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Родитель
dd1055ed59
Коммит
cb7b29eb67
1
commit.c
1
commit.c
|
@ -1080,6 +1080,7 @@ struct commit_list *reduce_heads(struct commit_list *heads)
|
|||
num_head = remove_redundant(array, num_head);
|
||||
for (i = 0; i < num_head; i++)
|
||||
tail = &commit_list_insert(array[i], tail)->next;
|
||||
free(array);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче