aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2007-07-24 19:54:01 +0000
committerMichael Snyder <msnyder@vmware.com>2007-07-24 19:54:01 +0000
commitd0f16d5ecee58c911ec135380b56d1fbb93dc03e (patch)
treec15382ebdff1fbc7ecd4eec84657d692f96db0e2
parent9b9966104b89e9ff4db9a5da3a049b461d765a41 (diff)
downloadgdb-d0f16d5ecee58c911ec135380b56d1fbb93dc03e.zip
gdb-d0f16d5ecee58c911ec135380b56d1fbb93dc03e.tar.gz
gdb-d0f16d5ecee58c911ec135380b56d1fbb93dc03e.tar.bz2
2007-07-24 Michael Snyder <msnyder@access-company.com>
* elflink.c (bfd_elf_final_link): Avoid redundant frees -- return on bfd_malloc error rather than goto error_return.
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elflink.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 22f8641..1b377b4 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2007-07-24 Michael Snyder <msnyder@access-company.com>
+
+ * elflink.c (bfd_elf_final_link): Avoid redundant frees -- return
+ on bfd_malloc error rather than goto error_return.
+
2007-07-24 Alan Modra <amodra@bigpond.net.au>
* elflink.c (_bfd_elf_link_just_syms, merge_sections_remove_hook,
diff --git a/bfd/elflink.c b/bfd/elflink.c
index 2fd8f05..07a6aec 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);