open, fopen: close fd leak in last patch
authorEric Blake <ebb9@byu.net>
Wed, 24 Sep 2008 16:55:19 +0000 (10:55 -0600)
committerEric Blake <ebb9@byu.net>
Wed, 24 Sep 2008 16:55:19 +0000 (10:55 -0600)
commit810a812bee90d6bab12e9628dc7745eea49f188c
treeec90f3161214e6074b75064a7cd05d04f6aa4f14
parent955345ebebdae2b894b5a3d8e21036335cb13e5d
open, fopen: close fd leak in last patch

* lib/open.c (rpl_open): Close fd before returning error.
* lib/fopen.c (rpl_fopen): Close fd before returning error.
* doc/posix-functions/open.texi (open): Document that Irix also
has the bug.
* doc/posix-functions/fopen.texi (fopen): Likewise.
Reported by Paolo Bonzini.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
doc/posix-functions/fopen.texi
doc/posix-functions/open.texi
lib/fopen.c
lib/open.c