X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=bfd%2Felf32-ip2k.c;h=c0c8b8ec9a71b2b381ab5e9adf17ab535459b6f8;hb=5f8989944880cad1bfffab3801214a0a9b67b72e;hp=6e5131ff98be74276a230c2e538bc134fba548df;hpb=fd3619828e94a24a92cddec42cbc0ab33352eeb4;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/elf32-ip2k.c b/bfd/elf32-ip2k.c index 6e5131ff98..c0c8b8ec9a 100644 --- a/bfd/elf32-ip2k.c +++ b/bfd/elf32-ip2k.c @@ -1,5 +1,5 @@ /* Ubicom IP2xxx specific support for 32-bit ELF - Copyright (C) 2000-2019 Free Software Foundation, Inc. + Copyright (C) 2000-2020 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -638,8 +638,7 @@ adjust_all_relocations (bfd *abfd, { if (!bfd_malloc_and_get_section (abfd, stab, &stabcontents)) { - if (stabcontents != NULL) - free (stabcontents); + free (stabcontents); return; } @@ -1210,21 +1209,17 @@ ip2k_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; }