diff options
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 4 | ||||
-rw-r--r-- | bfd/evax-emh.c | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 74e90b2..9b20189 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,7 @@ +Sat Nov 22 16:06:56 1997 Klaus Kaempf <kkaempf@progis.de> + + * evax-emh.c (_bfd_evax_write_emh): Use alloca instead of strdup. + Sat Nov 22 12:29:30 1997 Ian Lance Taylor <ian@cygnus.com> * elf32-sh.c (sh_elf_relax_delete_bytes): Don't kill LABEL diff --git a/bfd/evax-emh.c b/bfd/evax-emh.c index 2b50006..9311bf0 100644 --- a/bfd/evax-emh.c +++ b/bfd/evax-emh.c @@ -202,12 +202,9 @@ _bfd_evax_write_emh (abfd) char *fname, *fout, *fptr; - fname = strdup (bfd_get_filename (abfd)); - if (fname == 0) - { - bfd_set_error (bfd_error_no_memory); - return -1; - } + fptr = bfd_get_filename (abfd); + fname = (char *) alloca (strlen (fptr) + 1); + strcpy (fname, fptr); fout = strrchr (fname, ']'); if (fout == 0) fout = strchr (fname, ':'); @@ -234,7 +231,6 @@ _bfd_evax_write_emh (abfd) *fptr = 0; } _bfd_evax_output_counted (abfd, fout); - free (fname); } else _bfd_evax_output_counted (abfd, "NONAME"); |