Skip to content

Commit f32784a

Browse files
committed
set comm and info to null after freed
1 parent 1990950 commit f32784a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/testcases/tst_free_comm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ tst_fmt(char *fname, int cmode)
4747
err = ncmpi_create(comm, fname, cmode, info, &ncid); EXP_ERR(exp_err)
4848
if (err == NC_ENOTBUILT) goto fn_exit;
4949

50-
MPI_Comm_free(&comm);
51-
MPI_Info_free(&info);
50+
MPI_Comm_free(&comm); comm = MPI_COMM_NULL;
51+
MPI_Info_free(&info); info = MPI_INFO_NULL;
5252

5353
err = ncmpi_close(ncid); CHECK_ERR
5454

0 commit comments

Comments
 (0)