From: Nick Clifton Date: Thu, 30 Oct 2014 09:37:45 +0000 (+0000) Subject: Fix a memory leak in the recent patch to detect loops in ELF section X-Git-Tag: binutils-2_25~102 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b9f41ce6e5341cd1f6e1512585410396afbd299b;p=platform%2Fupstream%2Fbinutils.git Fix a memory leak in the recent patch to detect loops in ELF section string indicies. * elf.c (bfd_section_from_shdr): Fix heap use after free memory leak. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index c4a85c6..bbcb345 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,13 +1,22 @@ +2014-10-30 Nick Clifton + + Appy trunk patch: + + 2014-10-29 Nick Clifton + * elf.c (bfd_section_from_shdr): Fix heap use after free memory + leak. + 2014-10-28 Matthew Fortune - Apply trunk patches + Apply trunk patches: + 2014-10-22 Matthew Fortune * elfxx-mips.c (print_mips_ases): Print unknown ASEs. (print_mips_isa_ext): Print the value of an unknown extension. 2014-10-28 Nick Clifton - * Apply trunk patches: + Apply trunk patches: 2014-10-28 Nick Clifton PR binutils/17512 @@ -39,7 +48,8 @@ 2014-10-28 Alan Modra - Apply trunk patches + Apply trunk patches: + 2014-10-21 Alan Modra * elf64-ppc.c (ppc64_elf_tls_optimize): Ignore relocs against toc entries that aren't a multiple of 8 rather than failing assertion. diff --git a/bfd/elf.c b/bfd/elf.c index b5fc84b..c8e659a 100644 --- a/bfd/elf.c +++ b/bfd/elf.c @@ -2106,7 +2106,7 @@ bfd_section_from_shdr (bfd *abfd, unsigned int shindex) fail: ret = FALSE; success: - if (sections_being_created) + if (sections_being_created && sections_being_created_abfd == abfd) sections_being_created [shindex] = FALSE; if (-- nesting == 0) { diff --git a/ld/ChangeLog b/ld/ChangeLog index f063ef4..dc69837 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,6 +1,7 @@ 2014-10-29 Nick Clifton * po/bg.po: Updated Bulgarian translation. + 2014-10-28 Alan Modra Apply trunk patches