aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2006-01-18 19:48:53 +0000
committerRoland McGrath <roland@gnu.org>2006-01-18 19:48:53 +0000
commit65515a052a0a3c5030031eb7971fc9194078269d (patch)
treef89fb4ff8a3cfaf5fdb3846da2d9c89740c1d28a
parentcf407dfbff840967d1051ade7fd0b9b583d59b46 (diff)
downloadglibc-65515a052a0a3c5030031eb7971fc9194078269d.tar
glibc-65515a052a0a3c5030031eb7971fc9194078269d.tar.gz
glibc-65515a052a0a3c5030031eb7971fc9194078269d.tar.bz2
glibc-65515a052a0a3c5030031eb7971fc9194078269d.zip
2006-01-18 Jakub Jelinek <jakub@redhat.com>
* elf/dl-deps.c (_dl_map_object_deps): In case of failure also make a copy of objname string.
-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;