X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=remote-curl.c;h=d159fe7f3433ccf6e8c8908961736951e42b9c35;hb=233054d114b0d68cf58d18f4c7ddd7723c08b24f;hp=bcbc7fba4ebef3a7828220840836a0cf491f9ea8;hpb=e27d620e919f524ee0bfa0a4d1f35225d3cb867e;p=git.git diff --git a/remote-curl.c b/remote-curl.c index bcbc7fba4..d159fe7f3 100644 --- a/remote-curl.c +++ b/remote-curl.c @@ -807,7 +807,7 @@ static int push(int nr_spec, char **specs) static void parse_push(struct strbuf *buf) { char **specs = NULL; - int alloc_spec = 0, nr_spec = 0, i; + int alloc_spec = 0, nr_spec = 0, i, ret; do { if (!prefixcmp(buf->buf, "push ")) { @@ -824,12 +824,13 @@ static void parse_push(struct strbuf *buf) break; } while (1); - if (push(nr_spec, specs)) - exit(128); /* error already reported */ - + ret = push(nr_spec, specs); printf("\n"); fflush(stdout); + if (ret) + exit(128); /* error already reported */ + free_specs: for (i = 0; i < nr_spec; i++) free(specs[i]);