summaryrefslogtreecommitdiff
path: root/credential-cache.c
diff options
context:
space:
mode:
authorLibravatar Stefan Beller <sbeller@google.com>2016-03-31 17:35:46 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-04-01 10:33:18 -0700
commit9c60d9faab43f73166d4cebb7c86b1bbf8d8df4b (patch)
tree117ccb7f588291213199bdafc7576bdbdc3890ae /credential-cache.c
parentbundle: don't leak an fd in case of early return (diff)
downloadtgif-9c60d9faab43f73166d4cebb7c86b1bbf8d8df4b.tar.xz
credential-cache, send_request: close fd when done
No need to keep it open any further. Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'credential-cache.c')
-rw-r--r--credential-cache.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/credential-cache.c b/credential-cache.c
index f4afdc6988..86e21de49b 100644
--- a/credential-cache.c
+++ b/credential-cache.c
@@ -32,6 +32,7 @@ static int send_request(const char *socket, const struct strbuf *out)
write_or_die(1, in, r);
got_data = 1;
}
+ close(fd);
return got_data;
}