aboutsummaryrefslogtreecommitdiff
path: root/libgfortran
diff options
context:
space:
mode:
authorJerry DeLisle <jvdelisle@gcc.gnu.org>2015-12-29 05:17:42 +0000
committerJerry DeLisle <jvdelisle@gcc.gnu.org>2015-12-29 05:17:42 +0000
commit820d395cc80cd6df592cf67bc87cfb5279354fa8 (patch)
tree5af7a40bedc6614a5a825068a35da28f4b5c76d8 /libgfortran
parentfcc75e0b147323f118394aac7e6badd3ff17cc61 (diff)
downloadgcc-820d395cc80cd6df592cf67bc87cfb5279354fa8.zip
gcc-820d395cc80cd6df592cf67bc87cfb5279354fa8.tar.gz
gcc-820d395cc80cd6df592cf67bc87cfb5279354fa8.tar.bz2
re PR libfortran/68987 (double free or corruption in _gfortran_st_write_done when a write statement to an internal file uses an invalid format and the ERR= specifier appears.)
2015-12-28 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libfortran/68987 io/format.c (format_error): Remove unneeded memory cleanup. From-SVN: r231989
Diffstat (limited to 'libgfortran')
-rw-r--r--libgfortran/ChangeLog7
-rw-r--r--libgfortran/io/format.c20
2 files changed, 6 insertions, 21 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index 2aca878..438537c 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,6 +1,11 @@
+2015-12-28 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR libfortran/68987
+ io/format.c (format_error): Remove unneeded memory cleanup.
+
2015-12-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
- PR libfortran/pr68867
+ PR libfortran/68867
* io/write.c (set_fnode_default): For kind=16, set the decimal precision
depending on the platform binary precision, 106 or 113.
diff --git a/libgfortran/io/format.c b/libgfortran/io/format.c
index 2068af7..fc7785e 100644
--- a/libgfortran/io/format.c
+++ b/libgfortran/io/format.c
@@ -1180,26 +1180,6 @@ format_error (st_parameter_dt *dtp, const fnode *f, const char *message)
*p++ = '^';
*p = '\0';
- /* Cleanup any left over memory allocations before calling generate
- error. */
- if (is_internal_unit (dtp))
- {
- if (dtp->format != NULL)
- {
- free (dtp->format);
- dtp->format = NULL;
- }
-
- /* Leave these alone if IOSTAT was given because execution will
- return from generate error in those cases. */
- if (!(dtp->common.flags & IOPARM_HAS_IOSTAT))
- {
- free (dtp->u.p.fmt);
- free_format_hash_table (dtp->u.p.current_unit);
- free_internal_unit (dtp);
- }
- }
-
generate_error (&dtp->common, LIBERROR_FORMAT, buffer);
}