Commit dab9d9b63ebe52eebf58e58dfccafcd21c53ad00

Stefan Sperling 2018-11-05T16:41:53

actually initialize cache struct in got_object_cache_init()

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/lib/object_cache.c b/lib/object_cache.c
index 8957a46..7957b39 100644
--- a/lib/object_cache.c
+++ b/lib/object_cache.c
@@ -42,6 +42,8 @@ got_object_cache_init(struct got_object_cache *cache,
 {
 	size_t size;
 
+	memset(cache, 0, sizeof(*cache));
+
 	switch (type) {
 	case GOT_OBJECT_CACHE_TYPE_OBJ:
 		size = GOT_OBJECT_CACHE_SIZE_OBJ;