Commit 507aef8f8e1be34cae656c48f04b5c814d8a7b76

Stefan Sperling 2018-11-05T18:57:41

no need to zero object cache entries during allocation

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 f4766bb..f965839 100644
--- a/lib/object_cache.c
+++ b/lib/object_cache.c
@@ -92,7 +92,7 @@ got_object_cache_add(struct got_object_cache *cache, struct got_object_id *id, v
 		cache->cache_evict++;
 	}
 
-	ce = calloc(1, sizeof(*ce));
+	ce = malloc(sizeof(*ce));
 	if (ce == NULL)
 		return got_error_from_errno();
 	memcpy(&ce->id, id, sizeof(ce->id));