X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/4aabf1133bae287cd37f9b9829a724a1bef2be53..2a5be1efbd30fcf80a06645c196fcec50b19e665:/examples/msg/suspend/suspend.c diff --git a/examples/msg/suspend/suspend.c b/examples/msg/suspend/suspend.c index 13db39fea6..84da0a8b30 100644 --- a/examples/msg/suspend/suspend.c +++ b/examples/msg/suspend/suspend.c @@ -78,7 +78,9 @@ int main(int argc, char *argv[]) MSG_create_environment(argv[1]); MSG_function_register("dream_master", dream_master); - MSG_process_create("dream_master", dream_master, NULL, xbt_dynar_getfirst_as(MSG_hosts_as_dynar(), msg_host_t)); + xbt_dynar_t hosts = MSG_hosts_as_dynar(); + MSG_process_create("dream_master", dream_master, NULL, xbt_dynar_getfirst_as(hosts, msg_host_t)); + xbt_dynar_free(&hosts); res = MSG_main(); XBT_INFO("Simulation time %g", MSG_get_clock());