aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf-m10200.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elf-m10200.c')
-rw-r--r--bfd/elf-m10200.c27
1 files changed, 9 insertions, 18 deletions
diff --git a/bfd/elf-m10200.c b/bfd/elf-m10200.c
index 0c8767e..58c1515 100644
--- a/bfd/elf-m10200.c
+++ b/bfd/elf-m10200.c
@@ -1207,21 +1207,17 @@ mn10200_elf_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;
@@ -1355,10 +1351,8 @@ mn10200_elf_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);
@@ -1367,13 +1361,10 @@ mn10200_elf_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;
}