summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 077d6f7)
raw | patch | inline | side by side (parent: 077d6f7)
author | Christian Couder <chriscool@tuxfamily.org> | |
Thu, 20 Sep 2007 05:23:01 +0000 (07:23 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 20 Sep 2007 07:10:48 +0000 (00:10 -0700) |
Earlier commit ce0cbad77 broke rev-list --bisect to cause it
segfault when the resulting set is empty.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
segfault when the resulting set is empty.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-rev-list.c | patch | blob | history |
diff --git a/builtin-rev-list.c b/builtin-rev-list.c
index 899a31d09ac31aaf1336b5ab3959345ac83a9579..38946339999e4e136b898b8f314e27d22ec1decb 100644 (file)
--- a/builtin-rev-list.c
+++ b/builtin-rev-list.c
/* Do the real work of finding bisection commit. */
best = do_find_bisection(list, nr, weights);
- if (best)
+ if (best) {
best->next = NULL;
-
- *reaches = weight(best);
+ *reaches = weight(best);
+ }
free(weights);
return best;