engines/dev-dax: fix leak of 'sfile' in error case
authorJens Axboe <axboe@kernel.dk>
Fri, 1 Dec 2017 02:48:25 +0000 (19:48 -0700)
committerJens Axboe <axboe@kernel.dk>
Fri, 1 Dec 2017 02:48:25 +0000 (19:48 -0700)
Signed-off-by: Jens Axboe <axboe@kernel.dk>
engines/dev-dax.c

index 235a31e..b1f91a4 100644 (file)
@@ -307,6 +307,7 @@ fio_devdax_get_file_size(struct thread_data *td, struct fio_file *f)
        if (rc < 0) {
                log_err("%s: fscanf on %s failed (%s)\n",
                        td->o.name, spath, strerror(errno));
+               fclose(sfile);
                return 1;
        }