Re: [PATCH 6/6] credential-cache, send_request: close fd when done
- From
Jeff King <peff@peff.net>
- Date
- Mar 30, 2016, 01:20 UTC
- Message-ID
- <20160330011959.GE2237@sigill.intra.peff.net>
- In-Reply-To
- <1459298333-21899-7-git-send-email-sbeller@google.com>
On Tue, Mar 29, 2016 at 05:38:53PM -0700, Stefan Beller wrote:
Show 18 quoted lines
> No need to keep it open any further. > > Signed-off-by: Stefan Beller <sbeller@google.com> > --- > credential-cache.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/credential-cache.c b/credential-cache.c > index f4afdc6..86e21de 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; > }
Looks good. I think nobody ever noticed because credential-cache basically sends off the request and then exits.
-Peff