X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/dc7418e3309ec6ac15b54b32e290e4d3240f8f63..419141e31ab0b62ff691f22fc08b49293fb180b4:/src/smpi/smpi_group.c diff --git a/src/smpi/smpi_group.c b/src/smpi/smpi_group.c index 99f3c519f6..ce769c1b71 100644 --- a/src/smpi/smpi_group.c +++ b/src/smpi/smpi_group.c @@ -118,9 +118,10 @@ int smpi_group_rank(MPI_Group group, int index) int * ptr_rank = NULL; char * key; int size = asprintf(&key, "%d", index); - if (size!=-1) + if (size!=-1){ ptr_rank = xbt_dict_get_or_null(group->index_to_rank_map, key); - else + xbt_free(key); + }else xbt_die("could not allocate memory for asprintf"); if (!ptr_rank) return MPI_UNDEFINED;