Re: [PATCH] copy_fd: close ifd on error
- From
Junio C Hamano <junkio@cox.net>
- Date
- Dec 27, 2005, 09:02 UTC
- Message-ID
- <7vpsnic3pq.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <20051227081905.GA9946@mars.ravnborg.org>
Sam Ravnborg <sam@ravnborg.org> writes:
Show 7 quoted lines
> In copy_fd when write fails we ought to close input file descriptor. > > Signed-off-by: Sam Ravnborg <sam@ravnborg.org> > --- > > 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.