merge: add t7613 for submodule updates
[gitweb.git] / commit.c
index f4793316a21fe5f3ee1932f7e24cf4ab0920b04c..881be3baa3ccc70afab916331588afb9330258ed 100644 (file)
--- a/commit.c
+++ b/commit.c
@@ -1031,7 +1031,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;