Re: [PATCH] Fix bunch of fd leaks in http-fetch
- From
Junio C Hamano <junkio@cox.net>
- Date
- Nov 12, 2005, 05:45 UTC
- Message-ID
- <7vk6feiflx.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <20051111235516.GY30496@pasky.or.cz>
Petr Baudis <pasky@suse.cz> writes:
> The current http-fetch is rather careless about fd leakage, causing > problems while fetching large repositories. This patch does not reserve > exhaustiveness, but I covered everything I spotted...
Thanks. While I am sure a quick fix is better for the end user than not doing anything at all, I am a bit reluctant.
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()...
Nick?