summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/src/h5perf/sio_engine.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/src/h5perf/sio_engine.c b/tools/src/h5perf/sio_engine.c
index 700416d..2363f6a 100644
--- a/tools/src/h5perf/sio_engine.c
+++ b/tools/src/h5perf/sio_engine.c
@@ -139,9 +139,7 @@ do_sio(parameters param, results *res)
/* IO type */
iot = param.io_type;
- if (NULL == (fname = calloc(FILENAME_MAX, sizeof(char))))
- GOTOERROR(FAIL);
-
+ /* MUST initialize fd early since we check its file IDs in cleanup code */
switch (iot) {
case POSIXIO:
fd.posixfd = -1;
@@ -157,6 +155,9 @@ do_sio(parameters param, results *res)
GOTOERROR(FAIL);
}
+ if (NULL == (fname = calloc(FILENAME_MAX, sizeof(char))))
+ GOTOERROR(FAIL);
+
linear_buf_size = 1;
for (i = 0; i < param.rank; i++) {