summaryrefslogtreecommitdiff
path: root/bfd/elf.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2012-11-13 22:54:21 +0000
committerH.J. Lu <hjl.tools@gmail.com>2012-11-13 22:54:21 +0000
commite5fee00d89c53a27013596fc6b21f69e92822a0a (patch)
treec84d56cbb1f91854f4624fbba6b18ce536d73099 /bfd/elf.c
parentba9eb309996498785e76eec85b22a4a085927382 (diff)
downloadbinutils-redhat-e5fee00d89c53a27013596fc6b21f69e92822a0a.tar.gz
Allocate elf_segment_map with bfd_zalloc
* elf.c (rewrite_elf_program_header): Allocate elf_segment_map with bfd_zalloc, instead of bfd_alloc.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r--bfd/elf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bfd/elf.c b/bfd/elf.c
index f40e81bbd5..b8bb6d3f93 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -6043,7 +6043,7 @@ rewrite_elf_program_header (bfd *ibfd, bfd *obfd)
and carry on looping. */
amt = sizeof (struct elf_segment_map);
amt += ((bfd_size_type) section_count - 1) * sizeof (asection *);
- map = (struct elf_segment_map *) bfd_alloc (obfd, amt);
+ map = (struct elf_segment_map *) bfd_zalloc (obfd, amt);
if (map == NULL)
{
free (sections);