diff options
author | Ian Lance Taylor <ian@airs.com> | 1995-11-29 22:05:37 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1995-11-29 22:05:37 +0000 |
commit | a9713b91a74c2cc05db65ec58573f388d2c41cc0 (patch) | |
tree | c786fa623034d37112d9290b9380d06ff0c36a5c /bfd/elf32-sparc.c | |
parent | 8f2bdc203241c910f5ddd969a5ebb5f7199f7edd (diff) | |
download | gdb-a9713b91a74c2cc05db65ec58573f388d2c41cc0.zip gdb-a9713b91a74c2cc05db65ec58573f388d2c41cc0.tar.gz gdb-a9713b91a74c2cc05db65ec58573f388d2c41cc0.tar.bz2 |
* opncls.c (bfd_alloc_by_size_t): Set bfd_error_no_memory if
obstack_alloc fails.
(bfd_alloc_finish): Set bfd_error_no_memory if obstack_finish
fails.
* libbfd.c (bfd_zmalloc): Set bfd_error_no_memory if malloc fails.
* Many files: don't set bfd_error_no_memory if one of the above
routines fails.
Diffstat (limited to 'bfd/elf32-sparc.c')
-rw-r--r-- | bfd/elf32-sparc.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/bfd/elf32-sparc.c b/bfd/elf32-sparc.c index c3ac311..46618e7 100644 --- a/bfd/elf32-sparc.c +++ b/bfd/elf32-sparc.c @@ -310,10 +310,7 @@ elf32_sparc_check_relocs (abfd, info, sec, relocs) size = symtab_hdr->sh_info * sizeof (bfd_vma); local_got_offsets = (bfd_vma *) bfd_alloc (abfd, size); if (local_got_offsets == NULL) - { - bfd_set_error (bfd_error_no_memory); - return false; - } + return false; elf_local_got_offsets (abfd) = local_got_offsets; for (i = 0; i < symtab_hdr->sh_info; i++) local_got_offsets[i] = (bfd_vma) -1; @@ -719,10 +716,7 @@ elf32_sparc_size_dynamic_sections (output_bfd, info) /* Allocate memory for the section contents. */ s->contents = (bfd_byte *) bfd_alloc (dynobj, s->_raw_size); if (s->contents == NULL && s->_raw_size != 0) - { - bfd_set_error (bfd_error_no_memory); - return false; - } + return false; } if (elf_hash_table (info)->dynamic_sections_created) |