From: Michael Snyder Date: Tue, 24 Jul 2007 19:54:01 +0000 (+0000) Subject: 2007-07-24 Michael Snyder X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d0f16d5ecee58c911ec135380b56d1fbb93dc03e;p=binutils-gdb.git 2007-07-24 Michael Snyder * elflink.c (bfd_elf_final_link): Avoid redundant frees -- return on bfd_malloc error rather than goto error_return. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 22f8641e2f9..1b377b4af87 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2007-07-24 Michael Snyder + + * elflink.c (bfd_elf_final_link): Avoid redundant frees -- return + on bfd_malloc error rather than goto error_return. + 2007-07-24 Alan Modra * elflink.c (_bfd_elf_link_just_syms, merge_sections_remove_hook, diff --git a/bfd/elflink.c b/bfd/elflink.c index 2fd8f053ef9..07a6aec0ab9 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -11043,7 +11043,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info) { bfd_byte *contents = bfd_malloc (attr_size); if (contents == NULL) - goto error_return; + return FALSE; /* Bail out and fail. */ bfd_elf_set_obj_attr_contents (abfd, contents, attr_size); bfd_set_section_contents (abfd, attr_section, contents, 0, attr_size); free (contents);