-/* Copyright (c) 2010, 2013-2014. The SimGrid Team.
+/* Copyright (c) 2010, 2013-2015. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
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;