Re: [PATCH] Fix bunch of fd leaks in http-fetch
- From
Petr Baudis <pasky@suse.cz>
- Date
- Nov 12, 2005, 19:55 UTC
- Message-ID
- <20051112195513.GF30496@pasky.or.cz>
- 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...
Show 15 quoted lines
> 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.