diff options
Diffstat (limited to 'bfd/elf32-avr.c')
-rw-r--r-- | bfd/elf32-avr.c | 33 |
1 files changed, 11 insertions, 22 deletions
diff --git a/bfd/elf32-avr.c b/bfd/elf32-avr.c index 2a6e743..d4ad18c 100644 --- a/bfd/elf32-avr.c +++ b/bfd/elf32-avr.c @@ -858,10 +858,8 @@ elf32_avr_link_hash_table_free (bfd *obfd) = (struct elf32_avr_link_hash_table *) obfd->link.hash; /* Free the address mapping table. */ - if (htab->amt_stub_offsets != NULL) - free (htab->amt_stub_offsets); - if (htab->amt_destination_addr != NULL) - free (htab->amt_destination_addr); + free (htab->amt_stub_offsets); + free (htab->amt_destination_addr); bfd_hash_table_free (&htab->bstab); _bfd_elf_link_hash_table_free (obfd); @@ -3166,21 +3164,17 @@ elf32_avr_relax_section (bfd *abfd, } } - if (internal_relocs != NULL - && elf_section_data (sec)->relocs != internal_relocs) + if (elf_section_data (sec)->relocs != internal_relocs) free (internal_relocs); return TRUE; error_return: - if (isymbuf != NULL - && symtab_hdr->contents != (unsigned char *) isymbuf) + if (symtab_hdr->contents != (unsigned char *) isymbuf) free (isymbuf); - if (contents != NULL - && elf_section_data (sec)->this_hdr.contents != contents) + if (elf_section_data (sec)->this_hdr.contents != contents) free (contents); - if (internal_relocs != NULL - && elf_section_data (sec)->relocs != internal_relocs) + if (elf_section_data (sec)->relocs != internal_relocs) free (internal_relocs); return FALSE; @@ -3273,10 +3267,8 @@ elf32_avr_get_relocated_section_contents (bfd *output_bfd, isymbuf, sections)) goto error_return; - if (sections != NULL) - free (sections); - if (isymbuf != NULL - && symtab_hdr->contents != (unsigned char *) isymbuf) + free (sections); + if (symtab_hdr->contents != (unsigned char *) isymbuf) free (isymbuf); if (elf_section_data (input_section)->relocs != internal_relocs) free (internal_relocs); @@ -3285,13 +3277,10 @@ elf32_avr_get_relocated_section_contents (bfd *output_bfd, return data; error_return: - if (sections != NULL) - free (sections); - if (isymbuf != NULL - && symtab_hdr->contents != (unsigned char *) isymbuf) + free (sections); + if (symtab_hdr->contents != (unsigned char *) isymbuf) free (isymbuf); - if (internal_relocs != NULL - && elf_section_data (input_section)->relocs != internal_relocs) + if (elf_section_data (input_section)->relocs != internal_relocs) free (internal_relocs); return NULL; } |