From: Junio C Hamano Date: Tue, 27 Dec 2005 09:02:41 GMT Subject: Re: [PATCH] copy_fd: close ifd on error Message-ID: <7vpsnic3pq.fsf@assigned-by-dhcp.cox.net> In-Reply-To: <20051227081905.GA9946@mars.ravnborg.org> Sam Ravnborg writes: > In copy_fd when write fails we ought to close input file descriptor. > > Signed-off-by: Sam Ravnborg > --- > > Found while looking at the source for inspiration for something else. > I did not see any error related to this. Thanks. I think the only place this matters is git-local-fetch which nobody uses these days where it can leak handful ifd. All other users immediately exit upon seeing failure return from the function. Of course this would matter much when we do libification.