Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
bisect: fix a regression causing a segfault
[gitweb.git]
/
bisect.c
diff --git
a/bisect.c
b/bisect.c
index 3756f127b0fbaee3959011dbcd2beebbf067c5af..87e4dee16d712bdb85a7133d00f87cd421945d08 100644
(file)
--- a/
bisect.c
+++ b/
bisect.c
@@
-229,8
+229,10
@@
static struct commit_list *best_bisection_sorted(struct commit_list *list, int n
if (i < cnt - 1)
p = p->next;
}
- free_commit_list(p->next);
- p->next = NULL;
+ if (p) {
+ free_commit_list(p->next);
+ p->next = NULL;
+ }
strbuf_release(&buf);
free(array);
return list;