about summary refs log tree commit diff
path: root/elf/dl-load.c
diff options
context:
space:
mode:
Diffstat (limited to 'elf/dl-load.c')
-rw-r--r--elf/dl-load.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/elf/dl-load.c b/elf/dl-load.c
index 1625d3cf5b..8103c7af2a 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -430,6 +430,9 @@ _dl_map_object_from_fd (const char *name, int fd, char *realname)
       }
   }
 
+  /* We are done mapping in the file.  We no longer need the descriptor.  */
+  __close (fd);
+
   l->l_type = type == ET_EXEC ? lt_executable : lt_library;
 
   if (l->l_ld == 0)