diff options
| author | Junio C Hamano <gitster@pobox.com> | 2024-12-04 10:14:46 +0900 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-12-04 10:14:46 +0900 |
| commit | 8c917be5d29c22d438a321baa585a87c026543b3 (patch) | |
| tree | 4c2ab69af930e0f112d27dc1434dda1c7632c8e6 | |
| parent | e5b71577a600691604116fc2ab09b9f79db29e4f (diff) | |
| parent | 5f9f7fafb7e74ef2965766345f45851732315b00 (diff) | |
| download | git-8c917be5d29c22d438a321baa585a87c026543b3.tar.gz | |
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
| -rw-r--r-- | bisect.c | 2 | ||||
| -rwxr-xr-x | t/t6002-rev-list-bisect.sh | 5 |
2 files changed, 5 insertions, 2 deletions
@@ -442,8 +442,6 @@ void find_bisection(struct commit_list **commit_list, int *reaches, best->next = NULL; } *reaches = weight(best); - } else { - free_commit_list(*commit_list); } *commit_list = best; diff --git a/t/t6002-rev-list-bisect.sh b/t/t6002-rev-list-bisect.sh index b95a0212ad..daa009c9a1 100755 --- a/t/t6002-rev-list-bisect.sh +++ b/t/t6002-rev-list-bisect.sh @@ -308,4 +308,9 @@ test_expect_success '--bisect-all --first-parent' ' 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 |
