Commit 4a9bc5ca092ba83ebbcf335d7f386a5145cadec0

Stefan Sperling 2018-06-22T09:31:55

fix leak in got_object_idset_remove()

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/lib/object_idset.c b/lib/object_idset.c
index 12537d5..38f091d 100644
--- a/lib/object_idset.c
+++ b/lib/object_idset.c
@@ -173,6 +173,7 @@ got_object_idset_remove(struct got_object_idset *set,
 	TAILQ_FOREACH_SAFE(entry, &set->entries[i], entry, tmp) {
 		if (got_object_id_cmp(&entry->id, id) == 0) {
 			TAILQ_REMOVE(&set->entries[i], entry, entry);
+			free(entry);
 			set->nelem--;
 			return NULL;
 		}