diff options
-rw-r--r-- | builtin-archive.c | 1 | ||||
-rw-r--r-- | connect.c | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/builtin-archive.c b/builtin-archive.c index 32737d3162..f613ac2516 100644 --- a/builtin-archive.c +++ b/builtin-archive.c @@ -74,6 +74,7 @@ static int run_remote_archiver(const char *remote, int argc, /* Now, start reading from fd[0] and spit it out to stdout */ rv = recv_sideband("archive", fd[0], 1, 2); close(fd[0]); + close(fd[1]); rv |= finish_connect(pid); return !!rv; @@ -529,7 +529,7 @@ static void git_tcp_connect(int fd[2], char *host) int sockfd = git_tcp_connect_sock(host); fd[0] = sockfd; - fd[1] = sockfd; + fd[1] = dup(sockfd); } |