One more f->file_name typo
authorJens Axboe <jens.axboe@oracle.com>
Tue, 13 Mar 2007 10:25:07 +0000 (11:25 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Tue, 13 Mar 2007 10:25:07 +0000 (11:25 +0100)
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
filesetup.c
fio.h

index a5b84c215cf740a50611ca20e16dfb0eedf1a49e..919bdf49504eebdc4b69c1643bf128c9001cbac2 100644 (file)
@@ -396,9 +396,10 @@ void close_files(struct thread_data *td)
        unsigned int i;
 
        for_each_file(td, f, i) {
        unsigned int i;
 
        for_each_file(td, f, i) {
-               if (!td->filename && (f->flags & FIO_FILE_UNLINK) &&
+               if (!f->file_name && (f->flags & FIO_FILE_UNLINK) &&
                    f->filetype == FIO_TYPE_FILE) {
                        unlink(f->file_name);
                    f->filetype == FIO_TYPE_FILE) {
                        unlink(f->file_name);
+                       free(f->file_name);
                        f->file_name = NULL;
                }
 
                        f->file_name = NULL;
                }
 
diff --git a/fio.h b/fio.h
index 5bf8c43d3f9b0736422cf9fa3bb9973eaeafd81a..c5764c8f4f0d977ce10323c75db514d23d4755dc 100644 (file)
--- a/fio.h
+++ b/fio.h
@@ -238,7 +238,7 @@ struct fio_file {
                unsigned long file_data;
                int fd;
        };
                unsigned long file_data;
                int fd;
        };
-       const char *file_name;
+       char *file_name;
        void *mmap;
        unsigned long long file_size;
        unsigned long long real_file_size;
        void *mmap;
        unsigned long long file_size;
        unsigned long long real_file_size;