From 701899296ca7dde6ba6c7e6fc54d79ab4a8df001 Mon Sep 17 00:00:00 2001 From: DongHun Kwak Date: Wed, 3 Mar 2021 15:14:33 +0900 Subject: Imported Upstream version 2.0.3 --- commit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'commit.c') diff --git a/commit.c b/commit.c index ebd7ad84..4ff8077d 100644 --- a/commit.c +++ b/commit.c @@ -1089,7 +1089,7 @@ struct commit_list *reduce_heads(struct commit_list *heads) p->item->object.flags |= STALE; num_head++; } - array = xcalloc(sizeof(*array), num_head); + array = xcalloc(num_head, sizeof(*array)); for (p = heads, i = 0; p; p = p->next) { if (p->item->object.flags & STALE) { array[i++] = p->item; -- cgit v1.2.3