Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 345758a

Browse files
committed
describe: handle error code returned by git_pqueue_insert
1 parent 2ba9a0d commit 345758a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/describe.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,8 @@ static int describe(
582582
best = (struct possible_tag *)git_vector_get(&all_matches, 0);
583583

584584
if (gave_up_on) {
585-
git_pqueue_insert(&list, gave_up_on);
585+
if ((error = git_pqueue_insert(&list, gave_up_on)) < 0)
586+
goto cleanup;
586587
seen_commits--;
587588
}
588589
if ((error = finish_depth_computation(

0 commit comments

Comments
 (0)