about summary refs log tree commit diff
path: root/elf/dl-close.c
diff options
context:
space:
mode:
Diffstat (limited to 'elf/dl-close.c')
-rw-r--r--elf/dl-close.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/elf/dl-close.c b/elf/dl-close.c
index 8e613eb3eb..0d4b176b1e 100644
--- a/elf/dl-close.c
+++ b/elf/dl-close.c
@@ -88,6 +88,11 @@ _dl_close (struct link_map *map)
   for (i = 0; i < nsearchlist; ++i)
     --list[i]->l_opencount;
 
+  if (map->l_origin != NULL)
+    free ((char *) map->l_origin);
+  /* The name always is allocated.  */
+  free (map->l_name);
+
   /* Check each element of the search list to see if all references to
      it are gone.  */
   for (i = 0; i < nsearchlist; ++i)