X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=binutils%2Frdcoff.c;h=4eb4d1579092b96a4c2721750204a8844c9e637f;hb=7ab967941150b2f79fc089893bf51e6bb53d245b;hp=3f08bf0a55225215360e0fa684fe8229044a7c01;hpb=b90efa5b79ac1524ec260f8eb89d1be37e0219a7;p=deliverable%2Fbinutils-gdb.git diff --git a/binutils/rdcoff.c b/binutils/rdcoff.c index 3f08bf0a55..4eb4d15790 100644 --- a/binutils/rdcoff.c +++ b/binutils/rdcoff.c @@ -1,5 +1,5 @@ /* stabs.c -- Parse COFF debugging information - Copyright (C) 1996-2015 Free Software Foundation, Inc. + Copyright (C) 1996-2020 Free Software Foundation, Inc. Written by Ian Lance Taylor . This file is part of GNU Binutils. @@ -409,6 +409,7 @@ parse_coff_struct_type (bfd *abfd, struct coff_symbols *symbols, { non_fatal (_("bfd_coff_get_syment failed: %s"), bfd_errmsg (bfd_get_error ())); + free (fields); return DEBUG_TYPE_NULL; } @@ -425,6 +426,7 @@ parse_coff_struct_type (bfd *abfd, struct coff_symbols *symbols, { non_fatal (_("bfd_coff_get_auxent failed: %s"), bfd_errmsg (bfd_get_error ())); + free (fields); return DEBUG_TYPE_NULL; } psubaux = &auxent; @@ -514,6 +516,8 @@ parse_coff_enum_type (bfd *abfd, struct coff_symbols *symbols, { non_fatal (_("bfd_coff_get_syment failed: %s"), bfd_errmsg (bfd_get_error ())); + free (names); + free (vals); return DEBUG_TYPE_NULL; } @@ -812,7 +816,7 @@ parse_coff (bfd *abfd, asymbol **syms, long symcount, void *dhandle) else base = auxent.x_sym.x_misc.x_lnsz.x_lnno - 1; - addr = bfd_get_section_vma (abfd, bfd_get_section (sym)); + addr = bfd_section_vma (bfd_asymbol_section (sym)); ++linenos;