+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
#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))