From be336aa5bafe154acc40145523e9c7b132505d8f Mon Sep 17 00:00:00 2001 From: degomme Date: Fri, 29 Apr 2016 15:25:37 +0200 Subject: [PATCH] leaks -- --- src/smpi/smpi_base.cpp | 6 +++--- src/smpi/smpi_pmpi.cpp | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/smpi/smpi_base.cpp b/src/smpi/smpi_base.cpp index 1b0e4f4ec3..82cc5a9bc7 100644 --- a/src/smpi/smpi_base.cpp +++ b/src/smpi/smpi_base.cpp @@ -1365,9 +1365,9 @@ void smpi_mpi_reduce(void *sendbuf, void *recvbuf, int count, MPI_Datatype datat xbt_free(tmpbufs); xbt_free(requests); - if( sendbuf == MPI_IN_PLACE ) { - smpi_free_tmp_buffer(sendtmpbuf); - } + } + if( sendbuf == MPI_IN_PLACE ) { + smpi_free_tmp_buffer(sendtmpbuf); } } diff --git a/src/smpi/smpi_pmpi.cpp b/src/smpi/smpi_pmpi.cpp index 707e29fdc7..49c769a18b 100644 --- a/src/smpi/smpi_pmpi.cpp +++ b/src/smpi/smpi_pmpi.cpp @@ -3177,6 +3177,7 @@ int PMPI_Info_dup(MPI_Info info, MPI_Info *newinfo){ return MPI_ERR_ARG; *newinfo = xbt_new(s_smpi_mpi_info_t, 1); (*newinfo)->info_dict= xbt_dict_new_homogeneous(NULL); + (*newinfo)->refcount=1; xbt_dict_cursor_t cursor = NULL; int *key; void* data; -- 2.20.1