Fixes another memory corruption bug introduced by patches for PR 17512.

* elf.c (bfd_section_from_shdr): Fix heap use after free memory
	leak.
This commit is contained in:
Nick Clifton 2014-10-29 20:58:13 +00:00
parent f60325bea5
commit e5b470e24c
2 changed files with 7 additions and 2 deletions

View File

@ -1,6 +1,11 @@
2014-10-29 Nick Clifton <nickc@redhat.com>
* elf.c (bfd_section_from_shdr): Fix heap use after free memory
leak.
2014-10-29 Dennis Brueni <dbrueni@slickedit.com>
* elf.c (elfcore_write_lwpstatus): fix typo in call to memcpy
* elf.c (elfcore_write_lwpstatus): Fix typo in call to memcpy.
2014-10-28 Nick Clifton <nickc@redhat.com>

View File

@ -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)
{