Fix crash on thread exit
authorJens Axboe <jens.axboe@oracle.com>
Thu, 22 Feb 2007 11:26:20 +0000 (12:26 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Thu, 22 Feb 2007 11:26:20 +0000 (12:26 +0100)
If we had multiple threads, we could corrupt the heap by
freeing memory we did not alloc.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
ioengines.c

index 39433207afd6f5984f981eeed52d689c6f6e38db..441f36fc530969b47474f43d240385edf32f11c3 100644 (file)
@@ -164,7 +164,10 @@ void close_ioengine(struct thread_data *td)
        if (td->io_ops->dlhandle)
                dlclose(td->io_ops->dlhandle);
 
+#if 0
+       /* we can't do this for threads, so just leak it, it's exiting */
        free(td->io_ops);
+#endif
        td->io_ops = NULL;
 }