aboutsummaryrefslogtreecommitdiff
path: root/gdb/exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/exec.c')
-rw-r--r--gdb/exec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/exec.c b/gdb/exec.c
index f1b1049..8ddb3df 100644
--- a/gdb/exec.c
+++ b/gdb/exec.c
@@ -475,7 +475,7 @@ build_section_table (struct bfd *some_bfd, struct target_section **start,
count = bfd_count_sections (some_bfd);
if (*start)
xfree (* start);
- *start = (struct target_section *) xmalloc (count * sizeof (**start));
+ *start = XNEWVEC (struct target_section, count);
*end = *start;
bfd_map_over_sections (some_bfd, add_to_section_table, (char *) end);
if (*end > *start + count)