diff options
author | Bernhard Reutner-Fischer <aldot@gcc.gnu.org> | 2023-05-07 18:32:01 +0200 |
---|---|---|
committer | Bernhard Reutner-Fischer <aldot@gcc.gnu.org> | 2023-05-08 07:55:48 +0200 |
commit | ca2f64d5d08c1699ca4b7cb2bf6a76692e809e0f (patch) | |
tree | 3d98e540a5d13c63b81418d0aa8f4824aa96c137 /libgfortran/io/format.c | |
parent | 2521390dd2f8e554ecccb380e0efd7aa21cd4b5f (diff) | |
download | gcc-ca2f64d5d08c1699ca4b7cb2bf6a76692e809e0f.zip gcc-ca2f64d5d08c1699ca4b7cb2bf6a76692e809e0f.tar.gz gcc-ca2f64d5d08c1699ca4b7cb2bf6a76692e809e0f.tar.bz2 |
fortran: Remove conditionals around free()
gcc/fortran/ChangeLog:
* resolve.cc (resolve_select_type): Call free() unconditionally.
libgfortran/ChangeLog:
* caf/single.c (_gfortran_caf_register): Call free() unconditionally.
* io/async.c (update_pdt, async_io): Likewise.
* io/format.c (free_format_data): Likewise.
* io/transfer.c (st_read_done_worker, st_write_done_worker): Likewise.
* io/unix.c (mem_close): Likewise.
Diffstat (limited to 'libgfortran/io/format.c')
-rw-r--r-- | libgfortran/io/format.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libgfortran/io/format.c b/libgfortran/io/format.c index 9e06902..66acbf0 100644 --- a/libgfortran/io/format.c +++ b/libgfortran/io/format.c @@ -269,8 +269,7 @@ free_format_data (format_data *fmt) fnp->format != FMT_NONE; fnp++) if (fnp->format == FMT_DT) { - if (GFC_DESCRIPTOR_DATA(fnp->u.udf.vlist)) - free (GFC_DESCRIPTOR_DATA(fnp->u.udf.vlist)); + free(GFC_DESCRIPTOR_DATA(fnp->u.udf.vlist)); free (fnp->u.udf.vlist); } |