diff --git a/remote-curl.c b/remote-curl.c
index 69831e931af1fe2a3e668239e8c4bb73a7bfb936..f48485931fc5e5ec9c17700801dd88d00ff40e01 100644 (file)
--- a/remote-curl.c
+++ b/remote-curl.c
static void parse_push(struct strbuf *buf)
{
char **specs = NULL;
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 ")) {
do {
if (!prefixcmp(buf->buf, "push ")) {
break;
} while (1);
break;
} while (1);
- if (push(nr_spec, specs))
- exit(128); /* error already reported */
-
+ ret = push(nr_spec, specs);
printf("\n");
fflush(stdout);
printf("\n");
fflush(stdout);
+ if (ret)
+ exit(128); /* error already reported */
+
free_specs:
for (i = 0; i < nr_spec; i++)
free(specs[i]);
free_specs:
for (i = 0; i < nr_spec; i++)
free(specs[i]);