aboutsummaryrefslogtreecommitdiff
path: root/elf
diff options
context:
space:
mode:
Diffstat (limited to 'elf')
-rw-r--r--elf/dl-load.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/elf/dl-load.c b/elf/dl-load.c
index 6e65980c3c..dd182c9155 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -797,6 +797,9 @@ _dl_init_paths (const char *llp)
(const void *) (D_PTR (l, l_info[DT_STRTAB])
+ l->l_info[DT_RUNPATH]->d_un.d_val),
l, "RUNPATH");
+ /* During rtld init the memory is allocated by the stub malloc,
+ prevent any attempt to free it by the normal malloc. */
+ l->l_runpath_dirs.malloced = 0;
/* The RPATH is ignored. */
l->l_rpath_dirs.dirs = (void *) -1;
@@ -813,6 +816,9 @@ _dl_init_paths (const char *llp)
(const void *) (D_PTR (l, l_info[DT_STRTAB])
+ l->l_info[DT_RPATH]->d_un.d_val),
l, "RPATH");
+ /* During rtld init the memory is allocated by the stub
+ malloc, prevent any attempt to free it by the normal
+ malloc. */
l->l_rpath_dirs.malloced = 0;
}
else