mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-27 14:39:09 +08:00
Free memory returned from bfd_get_synthetic_symtab
PR binutils/22203 * nm.c (display_rel_file): Free memory returned from bfd_get_synthetic_symtab.
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
2017-09-25 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
|
PR binutils/22203
|
||||||
|
* nm.c (display_rel_file): Free memory returned from
|
||||||
|
bfd_get_synthetic_symtab.
|
||||||
|
|
||||||
2017-09-22 Alexandre Oliva <aoliva@redhat.com>
|
2017-09-22 Alexandre Oliva <aoliva@redhat.com>
|
||||||
|
|
||||||
* dwarf.h (debug_info): Add loc_views and num_loc_views.
|
* dwarf.h (debug_info): Add loc_views and num_loc_views.
|
||||||
|
@ -1094,6 +1094,7 @@ display_rel_file (bfd *abfd, bfd *archive_bfd)
|
|||||||
void *minisyms;
|
void *minisyms;
|
||||||
unsigned int size;
|
unsigned int size;
|
||||||
struct size_sym *symsizes;
|
struct size_sym *symsizes;
|
||||||
|
asymbol *synthsyms = NULL;
|
||||||
|
|
||||||
if (! dynamic)
|
if (! dynamic)
|
||||||
{
|
{
|
||||||
@ -1124,7 +1125,6 @@ display_rel_file (bfd *abfd, bfd *archive_bfd)
|
|||||||
|
|
||||||
if (show_synthetic && size == sizeof (asymbol *))
|
if (show_synthetic && size == sizeof (asymbol *))
|
||||||
{
|
{
|
||||||
asymbol *synthsyms;
|
|
||||||
asymbol **static_syms = NULL;
|
asymbol **static_syms = NULL;
|
||||||
asymbol **dyn_syms = NULL;
|
asymbol **dyn_syms = NULL;
|
||||||
long static_count = 0;
|
long static_count = 0;
|
||||||
@ -1201,6 +1201,8 @@ display_rel_file (bfd *abfd, bfd *archive_bfd)
|
|||||||
else
|
else
|
||||||
print_size_symbols (abfd, dynamic, symsizes, symcount, archive_bfd);
|
print_size_symbols (abfd, dynamic, symsizes, symcount, archive_bfd);
|
||||||
|
|
||||||
|
if (synthsyms)
|
||||||
|
free (synthsyms);
|
||||||
free (minisyms);
|
free (minisyms);
|
||||||
free (symsizes);
|
free (symsizes);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user