From f91cacee5566a192b70948fcdb964d9e149bfbcf Mon Sep 17 00:00:00 2001 From: Michael Snyder Date: Tue, 24 Jul 2007 19:54:01 +0000 Subject: [PATCH] 2007-07-24 Michael Snyder * elflink.c (bfd_elf_final_link): Avoid redundant frees -- return on bfd_malloc error rather than goto error_return. --- bfd/ChangeLog | 5 +++++ bfd/elflink.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 22f8641e2..1b377b4af 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 2fd8f053e..07a6aec0a 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); -- 2.11.4.GIT