projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
160c715
)
Fix crash when attempting to dupe options
author
Jens Axboe
<axboe@kernel.dk>
Wed, 9 Nov 2011 19:25:21 +0000
(20:25 +0100)
committer
Jens Axboe
<axboe@kernel.dk>
Wed, 9 Nov 2011 19:25:21 +0000
(20:25 +0100)
If the engine has extended options but isn't loaded, boom.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
options.c
patch
|
blob
|
blame
|
history
diff --git
a/options.c
b/options.c
index 6352f0a8827bc8c8902f376aab677fbec4768d81..53c3a82674f1821961c41ec8fb15cd44f29ced12 100644
(file)
--- a/
options.c
+++ b/
options.c
@@
-2484,8
+2484,10
@@
void options_mem_dupe(void *data, struct fio_option *options)
void fio_options_mem_dupe(struct thread_data *td)
{
options_mem_dupe(&td->o, options);
- if (td->eo) {
+
+ if (td->eo && td->io_ops) {
void *oldeo = td->eo;
+
td->eo = malloc(td->io_ops->option_struct_size);
memcpy(td->eo, oldeo, td->io_ops->option_struct_size);
options_mem_dupe(td->eo, td->io_ops->options);