summaryrefslogtreecommitdiff
path: root/libgfortran/io/unit.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgfortran/io/unit.c')
-rw-r--r--libgfortran/io/unit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libgfortran/io/unit.c b/libgfortran/io/unit.c
index a406c9e8be9..22b315a4fd3 100644
--- a/libgfortran/io/unit.c
+++ b/libgfortran/io/unit.c
@@ -454,7 +454,7 @@ get_internal_unit (st_parameter_dt *dtp)
{
iunit->rank = GFC_DESCRIPTOR_RANK (dtp->internal_unit_desc);
iunit->ls = (array_loop_spec *)
- xmalloc (iunit->rank * sizeof (array_loop_spec));
+ xmallocarray (iunit->rank, sizeof (array_loop_spec));
dtp->internal_unit_len *=
init_loop_spec (dtp->internal_unit_desc, iunit->ls, &start_record);