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
commit3e961c545208634732e0b66fbf291b671c6978ad (patch)
treeb1c332427cc5586086e1f37c0f3477fc9cd2498d /bfd/elf.c
parent5e3b6c7d7dfdfdb906d6dc445207b7929c0aa7e9 (diff)
downloadgdb-3e961c545208634732e0b66fbf291b671c6978ad.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 f40e81bbd52..b8bb6d3f93a 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);