From e463f17941b272078e9c3d3e043f486b92c85be9 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Thu, 8 Jun 2006 11:03:18 +0200 Subject: [PATCH] [PATCH] Let thread exit cleanup the small allocs Makes it easier to just inherit the allocations. --- fio.c | 19 ------------------- init.c | 8 -------- 2 files changed, 27 deletions(-) diff --git a/fio.c b/fio.c index aa5071ca..7aef8225 100644 --- a/fio.c +++ b/fio.c @@ -933,24 +933,6 @@ static int init_io_u(struct thread_data *td) return 0; } -static void cleanup_allocs(struct thread_data *td) -{ - if (td->directory) - free(td->directory); - if (td->iolog_file) - free(td->iolog_file); - if (td->exec_prerun) - free(td->exec_prerun); - if (td->exec_postrun) - free(td->exec_postrun); - if (td->ioscheduler) - free(td->ioscheduler); - if (td->sysfs_root) - free(td->sysfs_root); - if (td->file_name) - free(td->file_name); -} - static int create_file(struct thread_data *td, unsigned long long size, int extend) { @@ -1406,7 +1388,6 @@ err: } if (td->mmap) munmap(td->mmap, td->file_size); - cleanup_allocs(td); cleanup_io(td); cleanup_io_u(td); td_set_runstate(td, TD_EXITED); diff --git a/init.c b/init.c index 44d37341..0ec8e9d5 100644 --- a/init.c +++ b/init.c @@ -71,14 +71,6 @@ static struct thread_data *get_new_job(int global, struct thread_data *parent) td->fd = -1; td->thread_number = thread_number; - td->directory = NULL; - td->iolog_file = NULL; - td->exec_prerun = NULL; - td->exec_postrun = NULL; - td->ioscheduler = NULL; - td->sysfs_root = NULL; - td->file_name = NULL; - return td; } -- 2.25.1