Merge branch 'ma/bisect-leakfix'
A hotfix for a recent update that broke 'git bisect'. * ma/bisect-leakfix: bisect: fix a regression causing a segfault
This commit is contained in:
commit
4cc676c46c
6
bisect.c
6
bisect.c
@ -229,8 +229,10 @@ static struct commit_list *best_bisection_sorted(struct commit_list *list, int n
|
|||||||
if (i < cnt - 1)
|
if (i < cnt - 1)
|
||||||
p = p->next;
|
p = p->next;
|
||||||
}
|
}
|
||||||
free_commit_list(p->next);
|
if (p) {
|
||||||
p->next = NULL;
|
free_commit_list(p->next);
|
||||||
|
p->next = NULL;
|
||||||
|
}
|
||||||
strbuf_release(&buf);
|
strbuf_release(&buf);
|
||||||
free(array);
|
free(array);
|
||||||
return list;
|
return list;
|
||||||
|
Loading…
Reference in New Issue
Block a user