OSDN Git Service

PR libfortran/23784
authorfxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 9 Sep 2005 21:51:33 +0000 (21:51 +0000)
committerfxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 9 Sep 2005 21:51:33 +0000 (21:51 +0000)
* io/close.c (st_close): Call library_end even in case of error.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@104108 138bc75d-0d04-0410-961f-82ee72b054a4

libgfortran/ChangeLog
libgfortran/io/close.c

index 6e45ee0..2008edc 100644 (file)
@@ -1,3 +1,8 @@
+2005-09-09  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
+
+       PR libfortran/23784
+       * io/close.c (st_close): Call library_end even in case of error.
+
 2005-09-09  Thomas Koenig  <Thomas.Koenig@online.de>
 
        * io/io.h:  Add iomsg as last field of st_parameter.
 2005-09-09  Thomas Koenig  <Thomas.Koenig@online.de>
 
        * io/io.h:  Add iomsg as last field of st_parameter.
index 6010e92..3abaceb 100644 (file)
@@ -64,7 +64,10 @@ st_close (void)
                 "Bad STATUS parameter in CLOSE statement");
 
   if (ioparm.library_return != LIBRARY_OK)
                 "Bad STATUS parameter in CLOSE statement");
 
   if (ioparm.library_return != LIBRARY_OK)
+  {
+    library_end ();
     return;
     return;
+  }
 
   u = find_unit (ioparm.unit);
   if (u != NULL)
 
   u = find_unit (ioparm.unit);
   if (u != NULL)