Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
leaks --
authordegomme <augustin.degomme@unibas.ch>
Sat, 30 Apr 2016 11:14:56 +0000 (13:14 +0200)
committerdegomme <augustin.degomme@unibas.ch>
Sat, 30 Apr 2016 11:14:56 +0000 (13:14 +0200)
src/smpi/smpi_mpi_dt.cpp
src/smpi/smpi_pmpi.cpp

index c443edd..6e6410f 100644 (file)
@@ -201,6 +201,7 @@ int smpi_datatype_dup(MPI_Datatype datatype, MPI_Datatype* new_t)
           if(ret!=MPI_SUCCESS){
             smpi_datatype_unuse(*new_t);
             *new_t=MPI_DATATYPE_NULL;
           if(ret!=MPI_SUCCESS){
             smpi_datatype_unuse(*new_t);
             *new_t=MPI_DATATYPE_NULL;
+            xbt_dict_cursor_free(&cursor);
             return ret;
           }
           if(flag)
             return ret;
           }
           if(flag)
@@ -410,6 +411,7 @@ void smpi_datatype_free(MPI_Datatype* type){
       if(elem &&  elem->delete_fn)
         elem->delete_fn(*type,*key, value, &flag);
     }
       if(elem &&  elem->delete_fn)
         elem->delete_fn(*type,*key, value, &flag);
     }
+    xbt_dict_free(&(*type)->attributes);
   }
 
   if ((*type)->sizeof_substruct != 0){
   }
 
   if ((*type)->sizeof_substruct != 0){
index 22637d7..729c51a 100644 (file)
@@ -3219,7 +3219,8 @@ int PMPI_Info_get_nthkey( MPI_Info info, int n, char *key){
   int num=0;
   xbt_dict_foreach(info->info_dict,cursor,keyn,data){
     if(num==n){
   int num=0;
   xbt_dict_foreach(info->info_dict,cursor,keyn,data){
     if(num==n){
-     strcpy(key,keyn);
+      strcpy(key,keyn);
+      xbt_dict_cursor_free(&cursor);
       return MPI_SUCCESS;
     }
     num++;
       return MPI_SUCCESS;
     }
     num++;