summaryrefslogtreecommitdiff
path: root/libgfortran/io/transfer.c
diff options
context:
space:
mode:
authorpbrook <pbrook@138bc75d-0d04-0410-961f-82ee72b054a4>2004-10-07 21:30:50 +0000
committerpbrook <pbrook@138bc75d-0d04-0410-961f-82ee72b054a4>2004-10-07 21:30:50 +0000
commit15fee5a5fe210f09495373378a54ecbf0efd0d62 (patch)
treeb7ea43ee8fbb0688523cec944bf0d9d33a0978bf /libgfortran/io/transfer.c
parentce5a3d48326bd58bc9e3513ed6f277683cb97fd9 (diff)
downloadgcc-15fee5a5fe210f09495373378a54ecbf0efd0d62.tar.gz
* io/transfer.c (finalize_transfer): Free internal streams.
* io/unix.c (mem_close): Free stream object. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@88709 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran/io/transfer.c')
-rw-r--r--libgfortran/io/transfer.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libgfortran/io/transfer.c b/libgfortran/io/transfer.c
index 70a41fcff83..ceff76fc35c 100644
--- a/libgfortran/io/transfer.c
+++ b/libgfortran/io/transfer.c
@@ -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);
}