close_ioengine() clears ->data after calling engine cleanup
[fio.git] / ioengines.c
index fb6876366904378e5ee3b3dadf5463958e120552..662d55d7cf9d1087750a209fee471de0203dc532 100644 (file)
@@ -154,8 +154,10 @@ void close_ioengine(struct thread_data *td)
 {
        dprint(FD_IO, "close ioengine %s\n", td->io_ops->name);
 
-       if (td->io_ops->cleanup)
+       if (td->io_ops->cleanup) {
                td->io_ops->cleanup(td);
+               td->io_ops->data = NULL;
+       }
 
        if (td->io_ops->dlhandle)
                dlclose(td->io_ops->dlhandle);