зеркало из https://github.com/microsoft/git.git
bisect: fix memory leak in `find_bisection()`
`find_bisection()` rebuilds the commit list it is given by reversing it and skipping uninteresting commits. The uninteresting list entries are leaked. Free them to fix the leak. Signed-off-by: Martin Ågren <martin.agren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Родитель
24d707f636
Коммит
fc5c40bb2b
4
bisect.c
4
bisect.c
|
@ -379,8 +379,10 @@ void find_bisection(struct commit_list **commit_list, int *reaches,
|
|||
unsigned flags = p->item->object.flags;
|
||||
|
||||
next = p->next;
|
||||
if (flags & UNINTERESTING)
|
||||
if (flags & UNINTERESTING) {
|
||||
free(p);
|
||||
continue;
|
||||
}
|
||||
p->next = last;
|
||||
last = p;
|
||||
if (!(flags & TREESAME))
|
||||
|
|
Загрузка…
Ссылка в новой задаче