mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-20 18:08:24 +08:00
PR24933, Memory leak in elf_x86_64_get_synthetic_symtab
PR 24933 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Don't exit on error without freeing plts[] contents.
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
2019-08-23 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
|
PR 24933
|
||||||
|
* elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Don't exit
|
||||||
|
on error without freeing plts[] contents.
|
||||||
|
|
||||||
2019-08-22 Dennis Zhang <dennis.zhang@arm.com>
|
2019-08-22 Dennis Zhang <dennis.zhang@arm.com>
|
||||||
|
|
||||||
* cpu-arm.c: New entries for Cortex-M35P, Cortex-A77, Cortex-A76AE.
|
* cpu-arm.c: New entries for Cortex-M35P, Cortex-A77, Cortex-A76AE.
|
||||||
|
@ -2171,17 +2171,18 @@ _bfd_x86_elf_get_synthetic_symtab (bfd *abfd,
|
|||||||
bfd_vma);
|
bfd_vma);
|
||||||
bfd_boolean (*valid_plt_reloc_p) (unsigned int);
|
bfd_boolean (*valid_plt_reloc_p) (unsigned int);
|
||||||
|
|
||||||
|
dynrelbuf = NULL;
|
||||||
if (count == 0)
|
if (count == 0)
|
||||||
return -1;
|
goto bad_return;
|
||||||
|
|
||||||
dynrelbuf = (arelent **) bfd_malloc (relsize);
|
dynrelbuf = (arelent **) bfd_malloc (relsize);
|
||||||
if (dynrelbuf == NULL)
|
if (dynrelbuf == NULL)
|
||||||
return -1;
|
goto bad_return;
|
||||||
|
|
||||||
dynrelcount = bfd_canonicalize_dynamic_reloc (abfd, dynrelbuf,
|
dynrelcount = bfd_canonicalize_dynamic_reloc (abfd, dynrelbuf,
|
||||||
dynsyms);
|
dynsyms);
|
||||||
if (dynrelcount <= 0)
|
if (dynrelcount <= 0)
|
||||||
return -1;
|
goto bad_return;
|
||||||
|
|
||||||
/* Sort the relocs by address. */
|
/* Sort the relocs by address. */
|
||||||
qsort (dynrelbuf, dynrelcount, sizeof (arelent *),
|
qsort (dynrelbuf, dynrelcount, sizeof (arelent *),
|
||||||
|
Reference in New Issue
Block a user