From: Jens Axboe Date: Thu, 21 Feb 2008 08:52:35 +0000 (+0100) Subject: prune_io_piece_log() also needs to take list into account X-Git-Tag: fio-1.20-rc1~39 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=8ce9cd3dfab6a802272378e02695e87ebe40a973;ds=sidebyside prune_io_piece_log() also needs to take list into account If we didn't use the rbtree but have remaining entries to prune, loop over the list as well and free those entries. Signed-off-by: Jens Axboe --- diff --git a/log.c b/log.c index e7320ef8..8754eb05 100644 --- a/log.c +++ b/log.c @@ -108,6 +108,12 @@ void prune_io_piece_log(struct thread_data *td) rb_erase(n, &td->io_hist_tree); free(ipo); } + + while (!list_empty(&td->io_hist_list)) { + ipo = list_entry(td->io_hist_list.next, struct io_piece, list); + list_del(&ipo->list); + free(ipo); + } } /*