Remove kernel headers from rbtree.h
[fio.git] / fio.c
diff --git a/fio.c b/fio.c
index 9fabbe93bc53a7887cc6457371b55ea202ff3ebc..bed1e28770d1b2cb2a79edf0dccfd9bc796a28e4 100644 (file)
--- a/fio.c
+++ b/fio.c
@@ -735,8 +735,9 @@ static void *thread_main(void *data)
        INIT_LIST_HEAD(&td->io_u_freelist);
        INIT_LIST_HEAD(&td->io_u_busylist);
        INIT_LIST_HEAD(&td->io_u_requeues);
-       INIT_LIST_HEAD(&td->io_hist_list);
        INIT_LIST_HEAD(&td->io_log_list);
+       INIT_LIST_HEAD(&td->io_hist_list);
+       td->io_hist_tree = RB_ROOT;
 
        if (init_io_u(td))
                goto err_sem;
@@ -878,6 +879,7 @@ err:
        close_files(td);
        close_ioengine(td);
        cleanup_io_u(td);
+       options_mem_free(td);
        td_set_runstate(td, TD_EXITED);
        return (void *) (unsigned long) td->error;
 err_sem: