Commit 4229330be464eb3f99f05520e67edd1cb3cc1057

Stefan Sperling 2019-05-10T18:44:42

fix allocation size in alloc_added_blob_tree_entry()

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/lib/worktree.c b/lib/worktree.c
index 934b269..343a0f8 100644
--- a/lib/worktree.c
+++ b/lib/worktree.c
@@ -2408,7 +2408,7 @@ alloc_added_blob_tree_entry(struct got_tree_entry **new_te,
 
 	 *new_te = NULL;
 
-	*new_te = calloc(1, sizeof(*new_te));
+	*new_te = calloc(1, sizeof(**new_te));
 	if (*new_te == NULL)
 		return got_error_from_errno();