summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--builtin-fetch-pack.c4
1 files changed, 3 insertions, 1 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)