mirror of git://gcc.gnu.org/git/gcc.git
2015-11-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
Backport from trunk
PR libgfortran/65089
* io/format.h (free_format): New function to free memory
allocated for building format error messages.
* io/format.c (format_error): Add checks before freeing memory
to avoid potential segfaults and free formatting data when
needed on error conditions. Always allocate and NULL terminate
the string.
* io/transfer.c (st_read_done, st_write_done): Use new
free_format function to clean up memory allocations when done.
From-SVN: r229935
|
||
|---|---|---|
| .. | ||
| close.c | ||
| fbuf.c | ||
| fbuf.h | ||
| file_pos.c | ||
| format.c | ||
| format.h | ||
| inquire.c | ||
| intrinsics.c | ||
| io.h | ||
| list_read.c | ||
| lock.c | ||
| open.c | ||
| read.c | ||
| size_from_kind.c | ||
| transfer.c | ||
| transfer128.c | ||
| unit.c | ||
| unix.c | ||
| unix.h | ||
| write.c | ||
| write_float.def | ||