Commit ffb1f41949d3f4441013fddbcbc7dceb63697a96

Patrick Steinhardt 2016-03-01T14:24:09

describe: handle error code returned by git_pqueue_insert

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/src/describe.c b/src/describe.c
index 48f04e8..13ddad5 100644
--- a/src/describe.c
+++ b/src/describe.c
@@ -582,7 +582,8 @@ static int describe(
 	best = (struct possible_tag *)git_vector_get(&all_matches, 0);
 
 	if (gave_up_on) {
-		git_pqueue_insert(&list, gave_up_on);
+		if ((error = git_pqueue_insert(&list, gave_up_on)) < 0)
+			goto cleanup;
 		seen_commits--;
 	}
 	if ((error = finish_depth_computation(