projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
50070b5
)
Fix crash on thread exit
author
Jens Axboe
<jens.axboe@oracle.com>
Thu, 22 Feb 2007 11:26:20 +0000
(12:26 +0100)
committer
Jens 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
patch
|
blob
|
blame
|
history
diff --git
a/ioengines.c
b/ioengines.c
index 39433207afd6f5984f981eeed52d689c6f6e38db..441f36fc530969b47474f43d240385edf32f11c3 100644
(file)
--- 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;
}