Commit 32ac459c84bb6bc9e1c167c470256959f93d60f3

Stefan Sperling 2018-11-05T18:12:25

there's no need to zero tree entries during allocation

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
diff --git a/lib/object_parse.c b/lib/object_parse.c
index a36f34a..46c648c 100644
--- a/lib/object_parse.c
+++ b/lib/object_parse.c
@@ -404,11 +404,11 @@ got_alloc_tree_entry_partial(void)
 {
 	struct got_tree_entry *te;
 
-	te = calloc(1, sizeof(*te));
+	te = malloc(sizeof(*te));
 	if (te == NULL)
 		return NULL;
 
-	te->id = calloc(1, sizeof(*te->id));
+	te->id = malloc(sizeof(*te->id));
 	if (te->id == NULL) {
 		free(te);
 		te = NULL;