setup: refactor repo format reading and verification
[gitweb.git] / builtin / fast-export.c
index 2471297f7101964c61c055b10e24a7aa4b65326a..8164b581a66f257c5b4a74abbf1b76546946e2cf 100644 (file)
@@ -1021,7 +1021,7 @@ int cmd_fast_export(int argc, const char **argv, const char *prefix)
                const char **refspecs_str;
                int i;
 
-               refspecs_str = xmalloc(sizeof(*refspecs_str) * refspecs_list.nr);
+               ALLOC_ARRAY(refspecs_str, refspecs_list.nr);
                for (i = 0; i < refspecs_list.nr; i++)
                        refspecs_str[i] = refspecs_list.items[i].string;