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.
This commit is contained in:
Roland McGrath 2006-01-18 19:48:53 +00:00
parent cf407dfbff
commit 65515a052a

View 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;