aboutsummaryrefslogtreecommitdiff
path: root/bfd/vms.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2019-12-29 12:55:34 +1030
committerAlan Modra <amodra@gmail.com>2019-12-29 21:26:00 +1030
commit37d2e9c7b10e298403640fdd38a50fedae8525b2 (patch)
tree44a8f091400c523623a87c15d1373dcdae51619a /bfd/vms.h
parentf5d35bb7a5789950efd5f03b270d4c5f774eaba9 (diff)
downloadgdb-37d2e9c7b10e298403640fdd38a50fedae8525b2.zip
gdb-37d2e9c7b10e298403640fdd38a50fedae8525b2.tar.gz
gdb-37d2e9c7b10e298403640fdd38a50fedae8525b2.tar.bz2
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.
Diffstat (limited to 'bfd/vms.h')
-rw-r--r--bfd/vms.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/bfd/vms.h b/bfd/vms.h
index 6c96b58..8df75b7 100644
--- a/bfd/vms.h
+++ b/bfd/vms.h
@@ -118,8 +118,8 @@ extern void vms_time_t_to_vms_time (time_t ut, unsigned int *hi, unsigned int *l
extern void vms_get_time (unsigned int *hi, unsigned int *lo);
extern void vms_raw_get_time (unsigned char *buf);
-extern char * _bfd_vms_save_sized_string (unsigned char *, unsigned);
-extern char * _bfd_vms_save_counted_string (unsigned char *, unsigned);
+extern char * _bfd_vms_save_sized_string (bfd *, unsigned char *, size_t);
+extern char * _bfd_vms_save_counted_string (bfd *, unsigned char *, size_t);
extern void _bfd_vms_output_begin (struct vms_rec_wr *, int);
extern void _bfd_vms_output_alignment (struct vms_rec_wr *, int);
extern void _bfd_vms_output_begin_subrec (struct vms_rec_wr *, int);