init output param in got_object_idset_remove()
diff --git a/lib/object_idset.c b/lib/object_idset.c
index 3b924d5..234ba60 100644
--- a/lib/object_idset.c
+++ b/lib/object_idset.c
@@ -167,6 +167,9 @@ got_object_idset_remove(void **data, struct got_object_idset *set,
struct got_object_idset_element *entry, *tmp;
uint8_t i = id->sha1[0];
+ if (data)
+ *data = NULL;
+
if (set->nelem == 0)
return got_error(GOT_ERR_NO_OBJ);