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 70fcb1b719..40bc6f7202 100644
--- a/elf/dl-close.c
+++ b/elf/dl-close.c
@@ -215,6 +215,11 @@ _dl_close (void *_map)
 	  if (imap->l_phdr_allocated)
 	    free ((void *) imap->l_phdr);
 
+	  if (imap->l_rpath_dirs.dirs != (void *) -1)
+	    free (imap->l_rpath_dirs.dirs);
+	  if (imap->l_runpath_dirs.dirs != (void *) -1)
+	    free (imap->l_runpath_dirs.dirs);
+
 	  free (imap);
 	}
     }