Skip to content

Commit

Permalink
2006-01-18 Jakub Jelinek <jakub@redhat.com>
Browse files Browse the repository at this point in the history
	* elf/dl-deps.c (_dl_map_object_deps): In case of failure also make a
	copy of objname string.
  • Loading branch information
Roland McGrath committed Jan 18, 2006
1 parent cf407df commit 65515a0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions elf/dl-deps.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 65515a0

Please sign in to comment.