From: Jens Axboe Date: Thu, 22 Feb 2007 11:26:20 +0000 (+0100) Subject: Fix crash on thread exit X-Git-Tag: fio-1.12~30 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=19a98c4140020e82652a835faa6e0eac6173fa18 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 --- 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; }