asan: alpha-vms: memory leaks
authorAlan Modra <amodra@gmail.com>
Sun, 29 Dec 2019 02:25:34 +0000 (12:55 +1030)
committerAlan Modra <amodra@gmail.com>
Sun, 29 Dec 2019 10:56:00 +0000 (21:26 +1030)
commit37d2e9c7b10e298403640fdd38a50fedae8525b2
tree44a8f091400c523623a87c15d1373dcdae51619a
parentf5d35bb7a5789950efd5f03b270d4c5f774eaba9
asan: alpha-vms: memory leaks

* vms-misc.c (_bfd_vms_save_sized_string): Add abfd param, make
size a size_t.  Use bfd_alloc rather than bfd_malloc.
(_bfd_vms_save_counted_string): Similarly.
* vms.h (_bfd_vms_save_sized_string): Update prototype.
(_bfd_vms_save_counted_string): Likewise.
* vms-alpha.c (_bfd_vms_slurp_ehdr): Adjust
_bfd_vms_save_counted_string and bfd_vms_save_sized_string calls.
(_bfd_vms_slurp_egsd, parse_module): Likewise.
(_bfd_vms_slurp_eisd): Likewise.  Check return status.
(alpha_vms_bfd_link_hash_table_free): New function.
(alpha_vms_bfd_link_hash_table_create): Arrange to call it.
(vms_close_and_cleanup): Free more memory.  Don't release tdata.
bfd/ChangeLog
bfd/vms-alpha.c
bfd/vms-misc.c
bfd/vms.h