ioengines: clear out ->td_ops_dlhandle if we close it
authorJens Axboe <axboe@kernel.dk>
Fri, 15 Dec 2017 20:35:56 +0000 (13:35 -0700)
committerJens Axboe <axboe@kernel.dk>
Fri, 15 Dec 2017 20:35:56 +0000 (13:35 -0700)
Signed-off-by: Jens Axboe <axboe@kernel.dk>
ioengines.c

index 7951ff32e25c3e5090ebbc212731c6e0e86648a4..cec0c760f4a4a2c8c5cc089b8abc6d843dc492ea 100644 (file)
@@ -194,8 +194,10 @@ void free_ioengine(struct thread_data *td)
                td->eo = NULL;
        }
 
                td->eo = NULL;
        }
 
-       if (td->io_ops_dlhandle)
+       if (td->io_ops_dlhandle) {
                dlclose(td->io_ops_dlhandle);
                dlclose(td->io_ops_dlhandle);
+               td->io_ops_dlhandle = NULL;
+       }
 
        td->io_ops = NULL;
 }
 
        td->io_ops = NULL;
 }