diff options
author | jvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-04-30 03:19:37 +0000 |
---|---|---|
committer | jvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-04-30 03:19:37 +0000 |
commit | dc76f09068247054146fa16b0e356f9cbee690d3 (patch) | |
tree | e68b4424e5f3dc50a2b26fc763cbeef380fb27c1 /libgfortran/io | |
parent | e80a0566633dbe66ab01a55580d4a869facedd86 (diff) | |
download | gcc-dc76f09068247054146fa16b0e356f9cbee690d3.tar.gz |
2006-04-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/27360
* io/list_read.c (read_logical): Free line_buffer and free saved.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@113388 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran/io')
-rw-r--r-- | libgfortran/io/list_read.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/libgfortran/io/list_read.c b/libgfortran/io/list_read.c index 0d1969b5348..ab3965d5f58 100644 --- a/libgfortran/io/list_read.c +++ b/libgfortran/io/list_read.c @@ -652,6 +652,7 @@ read_logical (st_parameter_dt *dtp, int length) dtp->u.p.item_count = 0; dtp->u.p.line_buffer_enabled = 0; set_integer ((int *) dtp->u.p.value, v, length); + free_line (dtp); return; @@ -689,25 +690,27 @@ read_logical (st_parameter_dt *dtp, int length) bad_logical: + free_line (dtp); + if (nml_bad_return (dtp, c)) return; eat_line (dtp); free_saved (dtp); - if (dtp->u.p.line_buffer != NULL) - free_mem (dtp->u.p.line_buffer); st_sprintf (message, "Bad logical value while reading item %d", dtp->u.p.item_count); generate_error (&dtp->common, ERROR_READ_VALUE, message); return; logical_done: - + dtp->u.p.item_count = 0; dtp->u.p.line_buffer_enabled = 0; dtp->u.p.saved_type = BT_LOGICAL; dtp->u.p.saved_length = length; set_integer ((int *) dtp->u.p.value, v, length); + free_saved (dtp); + free_line (dtp); } |