summaryrefslogtreecommitdiff
path: root/bfd/vms-lib.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2012-08-20 14:32:28 +0000
committerTom Tromey <tromey@redhat.com>2012-08-20 14:32:28 +0000
commit66b8a0cb72bccc61559caf4328b3e894f0f4c04d (patch)
tree4a8314a80e9d608af158781f94a49de45c2c1b27 /bfd/vms-lib.c
parentc279f8673516777eb1b7c3e218f8bbe0308dedb9 (diff)
downloadbinutils-redhat-66b8a0cb72bccc61559caf4328b3e894f0f4c04d.tar.gz
* vms-lib.c (_bfd_vms_lib_get_module): Use bfd_zmalloc for
areltdata. * opncls.c (_bfd_delete_bfd): Free arelt_data. * mach-o.c (bfd_mach_o_fat_member_init): Use bfd_zmalloc for areltdata. * ecoff.c (_bfd_ecoff_slurp_armap): Use free for mapdata. * coff-rs6000.c (_bfd_xcoff_read_ar_hdr): Use bfd_zmalloc for areltdata. (xcoff_write_archive_contents_old): Likewise. (xcoff_write_archive_contents_big): Likewise. * archive64.c (bfd_elf64_archive_slurp_armap): Use free for areltdata. * archive.c (_bfd_generic_read_ar_hdr_mag): Use bfd_zmalloc and free for areltdata. (_bfd_get_elt_at_filepos): Likewise. Clear n_nfd->arelt_data on failure. (do_slurp_bsd_armap): Use bfd_zmalloc and free for areltdata. (do_slurp_coff_armap): Likewise. (_bfd_slurp_extended_name_table): Likewise. (bfd_slurp_bsd_armap_f2): Likewise. Don't leak 'mapdata'.
Diffstat (limited to 'bfd/vms-lib.c')
-rw-r--r--bfd/vms-lib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bfd/vms-lib.c b/bfd/vms-lib.c
index fa23b788e2..56b80ad58c 100644
--- a/bfd/vms-lib.c
+++ b/bfd/vms-lib.c
@@ -1,6 +1,6 @@
/* BFD back-end for VMS archive files.
- Copyright 2010, 2011 Free Software Foundation, Inc.
+ Copyright 2010, 2011, 2012 Free Software Foundation, Inc.
Written by Tristan Gingold <gingold@adacore.com>, AdaCore.
This file is part of BFD, the Binary File Descriptor library.
@@ -1337,7 +1337,7 @@ _bfd_vms_lib_get_module (bfd *abfd, unsigned int modidx)
res = _bfd_create_empty_archive_element_shell (abfd);
if (res == NULL)
return NULL;
- arelt = bfd_zalloc (res, sizeof (*arelt));
+ arelt = bfd_zmalloc (sizeof (*arelt));
if (arelt == NULL)
return NULL;
res->arelt_data = arelt;