regex: use regexec_buf()
[gitweb.git] / builtin / merge-base.c
index a8911626c2ca9e178c8f4373d544c670afdb6aea..c0d1822eb3ad371b9ab0b830aed2cc2741a978bd 100644 (file)
@@ -252,7 +252,7 @@ int cmd_merge_base(int argc, const char **argv, const char *prefix)
        if (argc < 2)
                usage_with_options(merge_base_usage, options);
 
-       rev = xmalloc(argc * sizeof(*rev));
+       ALLOC_ARRAY(rev, argc);
        while (argc-- > 0)
                rev[rev_nr++] = get_commit_reference(*argv++);
        return show_merge_base(rev, rev_nr, show_all);