aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--elf/dl-deps.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/elf/dl-deps.c b/elf/dl-deps.c
index a73e21db7b..fd3b5243fd 100644
--- a/elf/dl-deps.c
+++ b/elf/dl-deps.c
@@ -247,6 +247,7 @@ _dl_map_object_deps (struct link_map *map,
if (__builtin_expect (errstring != NULL, 0))
{
char *new_errstring = strdupa (errstring);
+ objname = strdupa (objname);
if (malloced)
free ((char *) errstring);
errstring = new_errstring;
@@ -337,6 +338,7 @@ _dl_map_object_deps (struct link_map *map,
if (__builtin_expect (errstring != NULL, 0))
{
char *new_errstring = strdupa (errstring);
+ objname = strdupa (objname);
if (malloced)
free ((char *) errstring);
errstring = new_errstring;