summaryrefslogtreecommitdiffstats
path: root/libgfortran/io/unit.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgfortran/io/unit.c')
-rw-r--r--libgfortran/io/unit.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/libgfortran/io/unit.c b/libgfortran/io/unit.c
index 1d522172635..e8a9b848367 100644
--- a/libgfortran/io/unit.c
+++ b/libgfortran/io/unit.c
@@ -483,11 +483,9 @@ free_internal_unit (st_parameter_dt *dtp)
if (dtp->u.p.current_unit != NULL)
{
- if (dtp->u.p.current_unit->ls != NULL)
- free (dtp->u.p.current_unit->ls);
+ free (dtp->u.p.current_unit->ls);
- if (dtp->u.p.current_unit->s)
- free (dtp->u.p.current_unit->s);
+ free (dtp->u.p.current_unit->s);
destroy_unit_mutex (dtp->u.p.current_unit);
}
@@ -652,8 +650,7 @@ close_unit_1 (gfc_unit *u, int locked)
delete_unit (u);
- if (u->file)
- free (u->file);
+ free (u->file);
u->file = NULL;
u->file_len = 0;
OpenPOWER on IntegriCloud