diff --git a/tests/cunit/test_darray_fill.c b/tests/cunit/test_darray_fill.c index 9316c84967b..2e6c43e9829 100644 --- a/tests/cunit/test_darray_fill.c +++ b/tests/cunit/test_darray_fill.c @@ -360,12 +360,11 @@ int main(int argc, char **argv) } /* next type */ } /* next fill value test case */ - } /* next rearranger */ - - /* Finalize PIO system. */ - if ((ret = PIOc_finalize(iosysid))) - return ret; + /* Finalize PIO iosysid. */ + if ((ret = PIOc_finalize(iosysid))) + return ret; + } /* next rearranger */ } /* endif my_rank < TARGET_NTASKS */ /* Finalize the MPI library. */