forked from Imagelibrary/binutils-gdb
Replace "if (x) free (x)" with "free (x)", bfd
* aoutx.h: Replace "if (x) free (x)" with "free (x)" throughout. * archive.c, * bfd.c, * bfdio.c, * coff-alpha.c, * coff-ppc.c, * coff-sh.c, * coff-stgo32.c, * coffcode.h, * coffgen.c, * cofflink.c, * cpu-arm.c, * doc/chew.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * elf-eh-frame.c, * elf-m10200.c, * elf-m10300.c, * elf-strtab.c, * elf.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-bfin.c, * elf32-cr16.c, * elf32-crx.c, * elf32-epiphany.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-ip2k.c, * elf32-m32c.c, * elf32-m68hc11.c, * elf32-m68k.c, * elf32-microblaze.c, * elf32-msp430.c, * elf32-nds32.c, * elf32-nios2.c, * elf32-ppc.c, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-sh.c, * elf32-spu.c, * elf32-v850.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c * elf64-mmix.c, * elf64-ppc.c, * elf64-sparc.c, * elfcode.h, * elflink.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-mips.c, * elfxx-x86.c, * format.c, * ihex.c, * libbfd.c, * linker.c, * mmo.c, * opncls.c, * pdp11.c, * peXXigen.c, * pef.c, * peicode.h, * simple.c, * som.c, * srec.c, * stabs.c, * syms.c, * targets.c, * vms-lib.c, * xcofflink.c, * xtensa-isa.c: Likewise.
This commit is contained in:
18
bfd/elf.c
18
bfd/elf.c
@@ -513,17 +513,14 @@ bfd_elf_get_elf_syms (bfd *ibfd,
|
||||
_bfd_error_handler (_("%pB symbol number %lu references"
|
||||
" nonexistent SHT_SYMTAB_SHNDX section"),
|
||||
ibfd, (unsigned long) symoffset);
|
||||
if (alloc_intsym != NULL)
|
||||
free (alloc_intsym);
|
||||
free (alloc_intsym);
|
||||
intsym_buf = NULL;
|
||||
goto out;
|
||||
}
|
||||
|
||||
out:
|
||||
if (alloc_ext != NULL)
|
||||
free (alloc_ext);
|
||||
if (alloc_extshndx != NULL)
|
||||
free (alloc_extshndx);
|
||||
free (alloc_ext);
|
||||
free (alloc_extshndx);
|
||||
|
||||
return intsym_buf;
|
||||
}
|
||||
@@ -1878,8 +1875,7 @@ _bfd_elf_print_private_bfd_data (bfd *abfd, void *farg)
|
||||
return TRUE;
|
||||
|
||||
error_return:
|
||||
if (dynbuf != NULL)
|
||||
free (dynbuf);
|
||||
free (dynbuf);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -5252,8 +5248,7 @@ _bfd_elf_map_sections_to_segments (bfd *abfd, struct bfd_link_info *info)
|
||||
return TRUE;
|
||||
|
||||
error_return:
|
||||
if (sections != NULL)
|
||||
free (sections);
|
||||
free (sections);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -9037,8 +9032,7 @@ _bfd_elf_slurp_version_tables (bfd *abfd, bfd_boolean default_imported_symver)
|
||||
return TRUE;
|
||||
|
||||
error_return:
|
||||
if (contents != NULL)
|
||||
free (contents);
|
||||
free (contents);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user