summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--iolog.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/iolog.c b/iolog.c
index 5a41e93f..a2cf0c1c 100644
--- a/iolog.c
+++ b/iolog.c
@@ -631,8 +631,6 @@ static bool init_iolog_read(struct thread_data *td, char *fname)
} else
f = fopen(fname, "r");
- free(fname);
-
if (!f) {
perror("fopen read iolog");
return false;
@@ -719,6 +717,7 @@ bool init_iolog(struct thread_data *td)
td->io_log_blktrace = 0;
ret = init_iolog_read(td, fname);
}
+ free(fname);
} else if (td->o.write_iolog_file)
ret = init_iolog_write(td);
else