]> gcc.gnu.org Git - gcc.git/commitdiff
transfer.c (finalize_transfer): Free internal streams.
authorPaul Brook <paul@codesourcery.com>
Thu, 7 Oct 2004 21:30:50 +0000 (21:30 +0000)
committerPaul Brook <pbrook@gcc.gnu.org>
Thu, 7 Oct 2004 21:30:50 +0000 (21:30 +0000)
* io/transfer.c (finalize_transfer): Free internal streams.
* io/unix.c (mem_close): Free stream object.

From-SVN: r88709

libgfortran/ChangeLog
libgfortran/io/transfer.c
libgfortran/io/unix.c

index f361408a50399243cbcccdd853672ca647765105..aafa660ccf51f7c181024b4688b1b29a7ea316f6 100644 (file)
@@ -1,3 +1,8 @@
+2004-10-07  Paul Brook  <paul@codesourcery.com>
+
+       * io/transfer.c (finalize_transfer): Free internal streams.
+       * io/unix.c (mem_close): Free stream object.
+
 2004-10-07  Paul Brook  <paul@codesourcery.com>
 
        * intrinsics/string_intrinsics.c (string_verify): Fix off by one
index 70a41fcff8356641dd0d3b11eb53eb004cdb3b3d..ceff76fc35c5aa10ad9b3dae4eda13a43d06e83a 100644 (file)
@@ -1349,7 +1349,8 @@ next_record (int done)
 
 
 /* Finalize the current data transfer.  For a nonadvancing transfer,
-   this means advancing to the next record.  */
+   this means advancing to the next record.  For internal units close the
+   steam associated with the unit.  */
 
 static void
 finalize_transfer (void)
@@ -1392,6 +1393,9 @@ finalize_transfer (void)
     }
 
   sfree (current_unit->s);
+
+  if (is_internal_unit ())
+    sclose (current_unit->s);
 }
 
 
index e55966b2f2a3e79ab52c5bb8bae89ae95b5e8013..c8b18fc96fc65958948833bfad2e8e8ff6662b71 100644 (file)
@@ -811,6 +811,7 @@ mem_truncate (unix_stream * s)
 static try
 mem_close (unix_stream * s)
 {
+  free_mem (s);
 
   return SUCCESS;
 }
This page took 0.067086 seconds and 5 git commands to generate.