From 19a98c4140020e82652a835faa6e0eac6173fa18 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Thu, 22 Feb 2007 12:26:20 +0100 Subject: [PATCH] Fix crash on thread exit If we had multiple threads, we could corrupt the heap by freeing memory we did not alloc. Signed-off-by: Jens Axboe --- ioengines.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ioengines.c b/ioengines.c index 39433207..441f36fc 100644 --- a/ioengines.c +++ b/ioengines.c @@ -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; } -- 2.25.1