diff options
Diffstat (limited to 'libgfortran/io/unit.c')
-rw-r--r-- | libgfortran/io/unit.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/libgfortran/io/unit.c b/libgfortran/io/unit.c index 385818adc1f..a406c9e8be9 100644 --- a/libgfortran/io/unit.c +++ b/libgfortran/io/unit.c @@ -786,7 +786,6 @@ unit_truncate (gfc_unit * u, gfc_offset pos, st_parameter_common * common) char * filename_from_unit (int n) { - char *filename; gfc_unit *u; int c; @@ -805,11 +804,7 @@ filename_from_unit (int n) /* Get the filename. */ if (u != NULL) - { - filename = (char *) xmalloc (u->file_len + 1); - unpack_filename (filename, u->file, u->file_len); - return filename; - } + return fc_strdup (u->file, u->file_len); else return (char *) NULL; } |