This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch, master, updated. glibc-2.10-352-g96961bf
- From: schwab at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 7 Oct 2009 08:27:50 -0000
- Subject: GNU C Library master sources branch, master, updated. glibc-2.10-352-g96961bf
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via 96961bf71d7e13d23dd497094257794504aeb673 (commit)
from b0f3a2e43fb9de9a4a2f4dfbdb84b98994752bc4 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=96961bf71d7e13d23dd497094257794504aeb673
commit 96961bf71d7e13d23dd497094257794504aeb673
Author: Andreas Schwab <schwab@redhat.com>
Date: Tue Oct 6 13:43:26 2009 +0200
Fix descriptor leak when calling dlopen with RTLD_NOLOAD
diff --git a/ChangeLog b/ChangeLog
index 7192970..934a866 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-10-06 Andreas Schwab <schwab@redhat.com>
+
+ * elf/dl-load.c (_dl_map_object_from_fd): Close fd before
+ returning if RTLD_NOLOAD.
+
2009-10-06 Roland McGrath <roland@redhat.com>
* sysdeps/x86_64/multiarch/strstr-c.c
diff --git a/elf/dl-load.c b/elf/dl-load.c
index 0b896d9..597193c 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -903,9 +903,12 @@ _dl_map_object_from_fd (const char *name, int fd, struct filebuf *fbp,
#endif
if (mode & RTLD_NOLOAD)
- /* We are not supposed to load the object unless it is already
- loaded. So return now. */
- return NULL;
+ {
+ /* We are not supposed to load the object unless it is already
+ loaded. So return now. */
+ __close (fd);
+ return NULL;
+ }
/* Print debugging message. */
if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_FILES, 0))
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 5 +++++
elf/dl-load.c | 9 ++++++---
2 files changed, 11 insertions(+), 3 deletions(-)
hooks/post-receive
--
GNU C Library master sources