diff options
author | pbrook <pbrook@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-10-07 21:30:50 +0000 |
---|---|---|
committer | pbrook <pbrook@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-10-07 21:30:50 +0000 |
commit | 15fee5a5fe210f09495373378a54ecbf0efd0d62 (patch) | |
tree | b7ea43ee8fbb0688523cec944bf0d9d33a0978bf /libgfortran | |
parent | ce5a3d48326bd58bc9e3513ed6f277683cb97fd9 (diff) | |
download | gcc-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')
-rw-r--r-- | libgfortran/ChangeLog | 5 | ||||
-rw-r--r-- | libgfortran/io/transfer.c | 6 | ||||
-rw-r--r-- | libgfortran/io/unix.c | 1 |
3 files changed, 11 insertions, 1 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index f361408a503..aafa660ccf5 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,5 +1,10 @@ 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 error. 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); } diff --git a/libgfortran/io/unix.c b/libgfortran/io/unix.c index e55966b2f2a..c8b18fc96fc 100644 --- a/libgfortran/io/unix.c +++ b/libgfortran/io/unix.c @@ -811,6 +811,7 @@ mem_truncate (unix_stream * s) static try mem_close (unix_stream * s) { + free_mem (s); return SUCCESS; } |