From: Petr Baudis <pasky@suse.cz>
To: Nick Hengeveld <nickh@reactrix.com>
Cc: Junio C Hamano <junkio@cox.net>, git@vger.kernel.org
Subject: Re: [PATCH] Fix bunch of fd leaks in http-fetch
Date: Sat, 12 Nov 2005 20:55:13 +0100 [thread overview]
Message-ID: <20051112195513.GF30496@pasky.or.cz> (raw)
In-Reply-To: <20051112173828.GG4051@reactrix.com>
Dear diary, on Sat, Nov 12, 2005 at 06:38:28PM CET, I got a letter
where Nick Hengeveld <nickh@reactrix.com> said that...
> On Fri, Nov 11, 2005 at 09:45:30PM -0800, Junio C Hamano wrote:
>
> > It strikes me somewhat odd that these close() are not tied to
> > the lifetime rule of the transfer_request structure. When the
> > program falls back from an individual object to alternates, the
> > same request structure is reused, but in that case ->local stays
> > the same. Otherwise, the original request structure is released
> > so I wonder if would make things cleaner to close ->local inside
> > request_release()...
>
> That is the intent of the fd close in finish_request() - but that isn't
> called if the server returns a 404 and there are no alternates left to
> try.
>
> The following patch should fix it.
What about the rest of the leaks?
Specifically, the one around release_request(), and the one caused by
re-open()ing local in start_request() when re-calling it on existing
request.
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
VI has two modes: the one in which it beeps and the one in which
it doesn't.
next prev parent reply other threads:[~2005-11-12 19:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-11 22:58 file descriptor leak? or expected behavior? Becky Bruce
2005-11-11 23:22 ` Becky Bruce
2005-11-11 23:55 ` [PATCH] Fix bunch of fd leaks in http-fetch Petr Baudis
2005-11-12 5:45 ` Junio C Hamano
2005-11-12 17:38 ` Nick Hengeveld
2005-11-12 19:55 ` Petr Baudis [this message]
2005-11-13 3:37 ` Nick Hengeveld
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20051112195513.GF30496@pasky.or.cz \
--to=pasky@suse.cz \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
--cc=nickh@reactrix.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).