Merge branch 'ps/bisect-double-free-fix'
Work around Coverity warning that would not trigger in practice. * ps/bisect-double-free-fix: bisect: address Coverity warning about potential double free
This commit is contained in:
2
bisect.c
2
bisect.c
@ -442,8 +442,6 @@ void find_bisection(struct commit_list **commit_list, int *reaches,
|
|||||||
best->next = NULL;
|
best->next = NULL;
|
||||||
}
|
}
|
||||||
*reaches = weight(best);
|
*reaches = weight(best);
|
||||||
} else {
|
|
||||||
free_commit_list(*commit_list);
|
|
||||||
}
|
}
|
||||||
*commit_list = best;
|
*commit_list = best;
|
||||||
|
|
||||||
|
@ -308,4 +308,9 @@ test_expect_success '--bisect-all --first-parent' '
|
|||||||
test_cmp expect actual
|
test_cmp expect actual
|
||||||
'
|
'
|
||||||
|
|
||||||
|
test_expect_success '--bisect without any revisions' '
|
||||||
|
git rev-list --bisect HEAD..HEAD >out &&
|
||||||
|
test_must_be_empty out
|
||||||
|
'
|
||||||
|
|
||||||
test_done
|
test_done
|
||||||
|
Reference in New Issue
Block a user