alpha-vms: error paths not freeing memory and malloc result checks
authorAlan Modra <amodra@gmail.com>
Sun, 1 Mar 2020 23:44:57 +0000 (10:14 +1030)
committerAlan Modra <amodra@gmail.com>
Mon, 2 Mar 2020 01:06:19 +0000 (11:36 +1030)
commit9cb56943d7f8de419d15e7ff1614d342b4682340
tree97e8c2be1c5b51c25712dce6efcaca7903b4e149
parent363a2bc6dd2b034a669c26055e021a17c96067e2
alpha-vms: error paths not freeing memory and malloc result checks

When realloc fails it doesn't free the old memory.  In BFD we usually
will exit with an error on a realloc fail, so want to tidy up memory
on error paths.  That's done by bfd_realloc_or_free.

* vms-alpha.c (vms_get_remaining_object_record): Use
bfd_realloc_or_free rather than bfd_realloc.
(add_symbol_entry, vector_grow1, alpha_vms_slurp_relocs): Likewise.
(dst_define_location, parse_module): Likewise, and check realloc
return status before using memory.  Return status from function
adjusting all callers.
bfd/ChangeLog
bfd/vms-alpha.c
This page took 0.028506 seconds and 4 git commands to generate.