This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Patch: name-finder fd leak fix
- From: Andrew Haley <aph at cambridge dot redhat dot com>
- To: tromey at redhat dot com
- Cc: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: Wed, 13 Mar 2002 10:47:41 +0000 (GMT)
- Subject: Patch: name-finder fd leak fix
- References: <873cz5qnfl.fsf@creche.redhat.com>
Tom Tromey writes:
> I think it is possible for name-finder to leak file descriptors.
> For instance, if the first pipe() succeeds but the second one fails,
> this will happen. Or, if the fdopen fails (can this really happen?),
> then we will leak an fd.
>
> This patch fixes the problem. Andrew, what do you think?
Fine, although if pipe() fails we're in a bad way already.
Andrew.