X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/9e6224ecd95ff7b6452fe9b2c088138877797542..e2093200437e2b32ece25429c4ce43c2ba1ffde5:/src/smpi/colls/reduce_scatter-mpich.c diff --git a/src/smpi/colls/reduce_scatter-mpich.c b/src/smpi/colls/reduce_scatter-mpich.c index 5101c7e01a..586142bbe0 100644 --- a/src/smpi/colls/reduce_scatter-mpich.c +++ b/src/smpi/colls/reduce_scatter-mpich.c @@ -45,6 +45,7 @@ int smpi_coll_tuned_reduce_scatter_mpich_pair(void *sendbuf, void *recvbuf, int } if (total_count == 0) { + xbt_free(disps); return MPI_ERR_COUNT; } @@ -134,7 +135,10 @@ int smpi_coll_tuned_reduce_scatter_mpich_pair(void *sendbuf, void *recvbuf, int if (mpi_errno) return(mpi_errno); } -return MPI_SUCCESS; + xbt_free(disps); + xbt_free(tmp_recvbuf); + + return MPI_SUCCESS; } @@ -263,7 +267,7 @@ int smpi_coll_tuned_reduce_scatter_mpich_rdb(void *sendbuf, void *recvbuf, int r int mask, dst_tree_root, my_tree_root, j, k; int received; MPI_Datatype sendtype, recvtype; - int nprocs_completed, tmp_mask, tree_root, is_commutative; + int nprocs_completed, tmp_mask, tree_root, is_commutative=0; comm_size = smpi_comm_size(comm); rank = smpi_comm_rank(comm);