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;