builtin/branch.c: use error_errno()
[gitweb.git] / builtin / fetch.c
index 48c45ea5e3b77d5e7af339128971f294e6ea9a20..e4639d8eb1d5fda586520f10271c05a0897f2ea5 100644 (file)
@@ -1115,7 +1115,7 @@ static int fetch_one(struct remote *remote, int argc, const char **argv)
        if (argc > 0) {
                int j = 0;
                int i;
-               refs = xcalloc(argc + 1, sizeof(const char *));
+               refs = xcalloc(st_add(argc, 1), sizeof(const char *));
                for (i = 0; i < argc; i++) {
                        if (!strcmp(argv[i], "tag")) {
                                i++;