summaryrefslogtreecommitdiff
path: root/elf
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@redhat.com>2009-10-12 13:48:49 +0200
committerAndreas Schwab <schwab@redhat.com>2009-10-12 13:48:49 +0200
commit65179518b1cb8a755366e88884eec4b1a518b978 (patch)
treeb7481b2e654b61ee21f53fa278334af9071f5be8 /elf
parent0c9cd95902e46a4a9e7684aea494a969787f48ac (diff)
parent1abedcdad2eef3d262c115ac13f069900338727c (diff)
Merge remote branch 'origin/master' into fedora/master
Diffstat (limited to 'elf')
-rw-r--r--elf/dl-load.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/elf/dl-load.c b/elf/dl-load.c
index 0b896d9b47..597193c043 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))