From ed5bad754c1ff5a4544ef8ac6f2eed0261a9aec7 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Mon, 26 Dec 2011 03:23:34 +0100 Subject: [PATCH] bench: fix use of fd after close --- benchmark/io.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/benchmark/io.c b/benchmark/io.c index 53a5231f0..a4f457517 100644 --- a/benchmark/io.c +++ b/benchmark/io.c @@ -51,7 +51,6 @@ static void writetest(int size, size_t bsize) exit(254); } } - close(fd); #ifndef NSYNC # ifdef __linux__ @@ -61,6 +60,8 @@ static void writetest(int size, size_t bsize) # endif #endif /* SYNC */ + close(fd); + end = now(); elapsed = (end - start) / 1e6; mbps = ((tsize/elapsed)) / 1048576; -- 2.34.1