diff options
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; } |