diff options
-rw-r--r-- | builtin-fetch-pack.c | 4 | ||||
-rw-r--r-- | builtin-remote.c | 9 | ||||
-rw-r--r-- | diff.c | 1 |
3 files changed, 10 insertions, 4 deletions
diff --git a/builtin-fetch-pack.c b/builtin-fetch-pack.c index 6202462216..629735f547 100644 --- a/builtin-fetch-pack.c +++ b/builtin-fetch-pack.c @@ -483,7 +483,9 @@ static int sideband_demux(int fd, void *data) { int *xd = data; - return recv_sideband("fetch-pack", xd[0], fd); + int ret = recv_sideband("fetch-pack", xd[0], fd); + close(fd); + return ret; } static int get_pack(int xd[2], char **pack_lockfile) diff --git a/builtin-remote.c b/builtin-remote.c index f7d66189cc..d7ab6b2d5f 100644 --- a/builtin-remote.c +++ b/builtin-remote.c @@ -1005,9 +1005,12 @@ static int show(int argc, const char **argv) get_remote_ref_states(*argv, &states, query_flag); - printf("* remote %s\n URL: %s\n", *argv, - states.remote->url_nr > 0 ? - states.remote->url[0] : "(no URL)"); + printf("* remote %s\n", *argv); + if (states.remote->url_nr) { + for (i=0; i < states.remote->url_nr; i++) + printf(" URL: %s\n", states.remote->url[i]); + } else + printf(" URL: %s\n", "(no URL)"); if (no_query) printf(" HEAD branch: (not queried)\n"); else if (!states.heads.nr) @@ -3596,6 +3596,7 @@ static char *run_textconv(const char *pgm, struct diff_filespec *spec, if (start_command(&child) != 0 || strbuf_read(&buf, child.out, 0) < 0 || finish_command(&child) != 0) { + strbuf_release(&buf); remove_tempfile(); error("error running textconv command '%s'", pgm); return NULL; |