Commit 441e144cdc3b06bd194fd1e33f45a639cc9848f9

Stefan Sperling 2018-06-22T09:34:44

init output param in got_object_idset_remove()

1
2
3
4
5
6
7
8
9
10
11
12
13
14
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);