* 'td-eo-double-free-fix' of https://github.com/dpronin/fio:
correctly free thread_data options at the topmost parent process
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;
_exit(ret);
} else if (__td_index == fio_debug_jobno)
*fio_debug_jobp = pid;
- free(eo);
free(fd);
fd = NULL;
}
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) {
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)