bisect: fix a regression causing a segfault
In 7c117184 ("bisect: fix off-by-one error in `best_bisection_sorted()`", 2017-11-05) the more careful logic dealing with freeing p->next in 50e62a8e ("rev-list: implement --bisect-all", 2007-10-22) was removed. Restore the more careful check to avoid segfaulting. Ideally this would come with a test case, but we don't have steps to reproduce this, only a backtrace from gdb pointing to this being the issue. Reported-by: NYasushi SHOJI <yasushi.shoji@gmail.com> Signed-off-by: NÆvar Arnfjörð Bjarmason <avarab@gmail.com> Acked-by: NMartin Ågren <martin.agren@gmail.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
Showing
想要评论请 注册 或 登录