From: degomme Date: Thu, 28 Apr 2016 13:37:09 +0000 (+0200) Subject: leak-- (duplicate of a predefined datatype can be released) X-Git-Tag: v3_14~1313 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/b2a42bf37b744bebbbf79049cb5cd1e1d4e960fe leak-- (duplicate of a predefined datatype can be released) --- diff --git a/src/smpi/smpi_mpi_dt.cpp b/src/smpi/smpi_mpi_dt.cpp index 3002836186..559db5e4a0 100644 --- a/src/smpi/smpi_mpi_dt.cpp +++ b/src/smpi/smpi_mpi_dt.cpp @@ -179,6 +179,7 @@ int smpi_datatype_dup(MPI_Datatype datatype, MPI_Datatype* new_t) *new_t= xbt_new(s_smpi_mpi_datatype_t,1); memcpy(*new_t, datatype, sizeof(s_smpi_mpi_datatype_t)); (*new_t)->in_use=1; + (*new_t)->flags &= ~DT_FLAG_PREDEFINED; if (datatype->sizeof_substruct){ (*new_t)->substruct=xbt_malloc(datatype->sizeof_substruct); memcpy((*new_t)->substruct, datatype->substruct, datatype->sizeof_substruct);