]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
2006-01-18 Jakub Jelinek <jakub@redhat.com>
authorRoland McGrath <roland@gnu.org>
Wed, 18 Jan 2006 19:48:53 +0000 (19:48 +0000)
committerRoland McGrath <roland@gnu.org>
Wed, 18 Jan 2006 19:48:53 +0000 (19:48 +0000)
* elf/dl-deps.c (_dl_map_object_deps): In case of failure also make a
copy of objname string.

elf/dl-deps.c

index a73e21db7bc3423d6b1146f4f258e38aa1445d8c..fd3b5243fda7e381a459f1afdc042398b0ee908f 100644 (file)
@@ -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;