diff --git a/backend.c b/backend.c index 5f0740395b..b21c36640e 100644 --- a/backend.c +++ b/backend.c @@ -2494,10 +2494,7 @@ static void run_threads(struct sk_out *sk_out) strerror(ret)); } else { pid_t pid; - void *eo; dprint(FD_PROCESS, "will fork\n"); - eo = td->eo; - read_barrier(); pid = fork(); if (!pid) { int ret; @@ -2506,7 +2503,6 @@ static void run_threads(struct sk_out *sk_out) _exit(ret); } else if (__td_index == fio_debug_jobno) *fio_debug_jobp = pid; - free(eo); free(fd); fd = NULL; } diff --git a/ioengines.c b/ioengines.c index 361727250e..fd8c9d1a65 100644 --- a/ioengines.c +++ b/ioengines.c @@ -238,7 +238,8 @@ void free_ioengine(struct thread_data *td) if (td->eo && td->io_ops->options) { options_free(td->io_ops->options, td->eo); free(td->eo); - td->eo = NULL; + if (td->o.use_thread) + td->eo = NULL; } if (td->io_ops->dlhandle) { diff --git a/options.c b/options.c index 48aa0d7b1c..9432a0fbdf 100644 --- a/options.c +++ b/options.c @@ -5829,9 +5829,9 @@ void fio_options_free(struct thread_data *td) options_free(fio_options, &td->o); if (td->eo && td->io_ops && td->io_ops->options) { options_free(td->io_ops->options, td->eo); - free(td->eo); - td->eo = NULL; } + free(td->eo); + td->eo = NULL; } void fio_dump_options_free(struct thread_data *td)