From d646afc27bd30c899d16957194bd9645a72502d4 Mon Sep 17 00:00:00 2001 From: degomme Date: Tue, 26 Apr 2016 16:06:57 +0200 Subject: [PATCH] leaks again --- src/smpi/smpi_base.cpp | 2 +- src/smpi/smpi_rma.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/smpi/smpi_base.cpp b/src/smpi/smpi_base.cpp index 62699a1bc0..4f8742edc8 100644 --- a/src/smpi/smpi_base.cpp +++ b/src/smpi/smpi_base.cpp @@ -687,7 +687,7 @@ static void finish_wait(MPI_Request * request, MPI_Status * status) if(req->flags & RECV) subtype->unserialize(req->buf, req->old_buf, req->real_size/smpi_datatype_size(datatype) , datatype->substruct, req->op); - if(req->detached == 0) free(req->buf); + xbt_free(req->buf); }else if(req->flags & RECV){//apply op on contiguous buffer for accumulate int n =req->real_size/smpi_datatype_size(datatype); smpi_op_apply(req->op, req->buf, req->old_buf, &n, &datatype); diff --git a/src/smpi/smpi_rma.cpp b/src/smpi/smpi_rma.cpp index 98d3ae5aef..0514b83280 100644 --- a/src/smpi/smpi_rma.cpp +++ b/src/smpi/smpi_rma.cpp @@ -355,6 +355,7 @@ int smpi_mpi_win_complete(MPI_Win win){ win->requests=xbt_dynar_new(sizeof(MPI_Request), NULL); smpi_mpi_waitall(size,treqs,MPI_STATUSES_IGNORE); xbt_free(treqs); + smpi_group_unuse(win->group); win->opened--; //we're closed for business ! return MPI_SUCCESS; } @@ -404,6 +405,7 @@ int smpi_mpi_win_wait(MPI_Win win){ win->requests=xbt_dynar_new(sizeof(MPI_Request), NULL); smpi_mpi_waitall(size,treqs,MPI_STATUSES_IGNORE); xbt_free(treqs); + smpi_group_unuse(win->group); win->opened--; //we're opened for business ! return MPI_SUCCESS; } -- 2.20.1