Close iolog file if reading version string fails
authorStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Wed, 5 Jan 2011 10:02:30 +0000 (11:02 +0100)
committerJens Axboe <jaxboe@fusionio.com>
Wed, 5 Jan 2011 10:02:30 +0000 (11:02 +0100)
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
log.c

diff --git a/log.c b/log.c
index 266dc06b3b2df74d4d765835583bef44ee20d753..d4850a5290c6d375caba0fd019f70d4b77cf5236 100644 (file)
--- a/log.c
+++ b/log.c
@@ -415,6 +415,7 @@ static int init_iolog_read(struct thread_data *td)
        if (!p) {
                td_verror(td, errno, "iolog read");
                log_err("fio: unable to read iolog\n");
        if (!p) {
                td_verror(td, errno, "iolog read");
                log_err("fio: unable to read iolog\n");
+               fclose(f);
                return 1;
        }
 
                return 1;
        }