A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[surf] Remove sg_cabinet_cb
[simgrid.git]
/
src
/
smpi
/
smpi_group.c
diff --git
a/src/smpi/smpi_group.c
b/src/smpi/smpi_group.c
index
99f3c51
..
33f9902
100644
(file)
--- a/
src/smpi/smpi_group.c
+++ b/
src/smpi/smpi_group.c
@@
-1,4
+1,4
@@
-/* Copyright (c) 2010, 2013-201
4
. The SimGrid Team.
+/* Copyright (c) 2010, 2013-201
5
. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
@@
-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);
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);
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;
xbt_die("could not allocate memory for asprintf");
if (!ptr_rank)
return MPI_UNDEFINED;