coff: free malloc'd memory on successful target match too
authorAlan Modra <amodra@gmail.com>
Tue, 31 Dec 2019 23:58:42 +0000 (10:28 +1030)
committerAlan Modra <amodra@gmail.com>
Sat, 4 Jan 2020 08:23:07 +0000 (18:53 +1030)
commit991fb595e34598291a52b533fdc8005e1ead0799
tree32a27c687c953dcba3930d70e6e15a5c4c038a64
parent5ffd5873e653d4aa491d099e93833befffe86433
coff: free malloc'd memory on successful target match too

object_p functions cannot allocate memory by malloc and not free it
before returning.  Even a successful target match may not be the best
match.  If a match isn't used then those malloc'd blocks won't be
freed.

* coffgen.c (coff_real_object_p): Free malloc'd memory on target
match too.
bfd/ChangeLog
bfd/coffgen.c