Mercurial > gnulib
changeset 30164:c1343a90f0d5
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>
author | Eric Blake <ebb9@byu.net> |
---|---|
date | Wed, 24 Sep 2008 10:55:19 -0600 |
parents | 6051c7c4c19f |
children | 9ecf84bb4ac5 |
files | ChangeLog doc/posix-functions/fopen.texi doc/posix-functions/open.texi lib/fopen.c lib/open.c |
diffstat | 5 files changed, 14 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Wed Sep 24 13:50:02 2008 +0200 +++ b/ChangeLog Wed Sep 24 10:55:19 2008 -0600 @@ -1,3 +1,13 @@ +2008-09-24 Eric Blake <ebb9@byu.net> + + 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. + 2008-09-24 Bruno Haible <bruno@clisp.org> Ensure that a filename ending in a slash cannot be used to access a
--- a/doc/posix-functions/fopen.texi Wed Sep 24 13:50:02 2008 +0200 +++ b/doc/posix-functions/fopen.texi Wed Sep 24 10:55:19 2008 -0600 @@ -12,7 +12,7 @@ This function does not fail when the file name argument ends in a slash and (without the slash) names a nonexistent file or a file that is not a directory, on some platforms: -HP-UX 11.00, Solaris 9. +HP-UX 11.00, Solaris 9, Irix 5.3. @item On Windows platforms (excluding Cygwin), this function does usually not recognize the @file{/dev/null} filename.
--- a/doc/posix-functions/open.texi Wed Sep 24 13:50:02 2008 +0200 +++ b/doc/posix-functions/open.texi Wed Sep 24 10:55:19 2008 -0600 @@ -12,7 +12,7 @@ This function does not fail when the file name argument ends in a slash and (without the slash) names a nonexistent file or a file that is not a directory, on some platforms: -HP-UX 11.00, Solaris 9. +HP-UX 11.00, Solaris 9, Irix 5.3. @item On Windows platforms (excluding Cygwin), this function does usually not recognize the @file{/dev/null} filename.