[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[commits] r9058 - in /fsf/trunk/libc: ChangeLog elf/dl-load.c



Author: eglibc
Date: Thu Oct  8 00:03:48 2009
New Revision: 9058

Log:
Import glibc-mainline for 2009-10-08

Modified:
    fsf/trunk/libc/ChangeLog
    fsf/trunk/libc/elf/dl-load.c

Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Thu Oct  8 00:03:48 2009
@@ -1,3 +1,8 @@
+2009-10-06  Andreas Schwab  <schwab@xxxxxxxxxx>
+
+	* elf/dl-load.c (_dl_map_object_from_fd): Close fd before
+	returning if RTLD_NOLOAD.
+
 2009-10-06  Roland McGrath  <roland@xxxxxxxxxx>
 
 	* sysdeps/x86_64/multiarch/strstr-c.c

Modified: fsf/trunk/libc/elf/dl-load.c
==============================================================================
--- fsf/trunk/libc/elf/dl-load.c (original)
+++ fsf/trunk/libc/elf/dl-load.c Thu Oct  8 00:03:48 2009
@@ -903,9 +903,12 @@
 #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))