do not create "struct commit" with xcalloc
[gitweb.git] / merge-recursive.c
index 41770929420da4cba934b0b86b9cd2f55f9cab31..fc2a68a0d1c01a6023effc6dd7b14200741f144b 100644 (file)
@@ -40,7 +40,7 @@ static struct tree *shift_tree_object(struct tree *one, struct tree *two,
 
 static struct commit *make_virtual_commit(struct tree *tree, const char *comment)
 {
-       struct commit *commit = xcalloc(1, sizeof(struct commit));
+       struct commit *commit = alloc_commit_node();
        struct merge_remote_desc *desc = xmalloc(sizeof(*desc));
 
        desc->name = comment;