Commit a0b3389c1fd0410d5840649d7646db956a3f7815

Stefan Sperling 2018-11-05T18:15:49

no need to zero new id cache elements during allocation

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/lib/object_idcache.c b/lib/object_idcache.c
index 340cb9c..7632943 100644
--- a/lib/object_idcache.c
+++ b/lib/object_idcache.c
@@ -99,7 +99,7 @@ got_object_idcache_add(struct got_object_idcache *cache,
 	if (cache->totelem >= cache->maxelem)
 		return got_error(GOT_ERR_NO_SPACE);
 
-	entry = calloc(1, sizeof(*entry));
+	entry = malloc(sizeof(*entry));
 	if (entry == NULL)
 		return got_error_from_errno();