From 3d57c0e9b017a745c748416ce46d2a532d4bc274 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Tue, 27 Oct 2015 18:16:12 +0900 Subject: [PATCH] stat: collapse buf output flush and free Signed-off-by: Jens Axboe --- stat.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/stat.c b/stat.c index 2c218158..7fa601b7 100644 --- a/stat.c +++ b/stat.c @@ -1627,15 +1627,14 @@ void __show_run_stats(void) show_idle_prof_stats(FIO_OUTPUT_NORMAL, NULL, &output[__FIO_OUTPUT_NORMAL]); } - for (i = 0; i < FIO_OUTPUT_NR; i++) + for (i = 0; i < FIO_OUTPUT_NR; i++) { buf_output_flush(&output[i]); + buf_output_free(&output[i]); + } log_info_flush(); free(runstats); free(threadstats); - - for (i = 0; i < FIO_OUTPUT_NR; i++) - buf_output_free(&output[i]); } void show_run_stats(void) -- 2.25.1