Commit acf0c7c67919d5a64e2af8257925d4a3615550cf

Stefan Sperling 2018-11-05T18:56:36

no need to zero commit's tree ID during allocation

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/lib/object_parse.c b/lib/object_parse.c
index ebec640..5b1301e 100644
--- a/lib/object_parse.c
+++ b/lib/object_parse.c
@@ -137,7 +137,7 @@ got_object_commit_alloc_partial(void)
 	commit = calloc(1, sizeof(*commit));
 	if (commit == NULL)
 		return NULL;
-	commit->tree_id = calloc(1, sizeof(*commit->tree_id));
+	commit->tree_id = malloc(sizeof(*commit->tree_id));
 	if (commit->tree_id == NULL) {
 		free(commit);
 		return NULL;