From 5f9540bf2c611d7cae3cdd6f28f2953c50bcdb38 Mon Sep 17 00:00:00 2001 From: Michal Schmidt Date: Tue, 9 Aug 2016 20:26:52 +0200 Subject: [PATCH] Fix group memory leak Groups obtained with MPI_Comm_group() should be released with MPI_Group_free() after use to avoid leaking. --- src/IMB_init.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/IMB_init.c b/src/IMB_init.c index e45f7ccafb..6ce631d83f 100644 --- a/src/IMB_init.c +++ b/src/IMB_init.c @@ -1322,6 +1322,9 @@ int IMB_init_communicator(struct comm_info* c_info, int NP) c_info->g_sizes,w_group, c_info->g_ranks ); snd = c_info->num_procs; + + MPI_Group_free(&group); + MPI_Group_free(&w_group); } else { -- 2.7.4