From e0fd73d434096bcddab24fcbea3bbaebdc6652ad Mon Sep 17 00:00:00 2001 From: Francois-Xavier Coudert Date: Fri, 9 Sep 2005 23:51:33 +0200 Subject: [PATCH] re PR libfortran/23784 (close doesn't reset ioparm on error exit) PR libfortran/23784 * io/close.c (st_close): Call library_end even in case of error. From-SVN: r104108 --- libgfortran/ChangeLog | 5 +++++ libgfortran/io/close.c | 3 +++ 2 files changed, 8 insertions(+) diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 6e45ee0ea29..2008edc443c 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,8 @@ +2005-09-09 Francois-Xavier Coudert + + PR libfortran/23784 + * io/close.c (st_close): Call library_end even in case of error. + 2005-09-09 Thomas Koenig * io/io.h: Add iomsg as last field of st_parameter. diff --git a/libgfortran/io/close.c b/libgfortran/io/close.c index 6010e921fcb..3abacebbc39 100644 --- a/libgfortran/io/close.c +++ b/libgfortran/io/close.c @@ -64,7 +64,10 @@ st_close (void) "Bad STATUS parameter in CLOSE statement"); if (ioparm.library_return != LIBRARY_OK) + { + library_end (); return; + } u = find_unit (ioparm.unit); if (u != NULL) -- 2.30.2