From: jvdelisle Date: Tue, 29 Dec 2015 05:17:42 +0000 (+0000) Subject: 2015-12-28 Jerry DeLisle X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f320bf879734807e239e5c0b1990ddb8454f5442;p=thirdparty%2Fgcc.git 2015-12-28 Jerry DeLisle PR libfortran/68987 io/format.c (format_error): Remove unneeded memory cleanup. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@231989 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 2aca878cd770..438537c998e8 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,6 +1,11 @@ +2015-12-28 Jerry DeLisle + + PR libfortran/68987 + io/format.c (format_error): Remove unneeded memory cleanup. + 2015-12-14 Jerry DeLisle - 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 2068af7eb849..fc7785e1eb80 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); }