X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/138e6f86566611611b1115c957cae0a1c6a85a4b..9e16470be6ab815e9db9f301760848bb5492dd43:/teshsuite/msg/host_on_off_recv/host_on_off_recv.c diff --git a/teshsuite/msg/host_on_off_recv/host_on_off_recv.c b/teshsuite/msg/host_on_off_recv/host_on_off_recv.c index 4d27e38e5d..0df6ef0adb 100644 --- a/teshsuite/msg/host_on_off_recv/host_on_off_recv.c +++ b/teshsuite/msg/host_on_off_recv/host_on_off_recv.c @@ -17,11 +17,8 @@ static int master(int argc, char *argv[]) XBT_INFO("Master starting"); MSG_process_sleep(0.5); - msg_comm_t comm = NULL; - { - msg_task_t task = MSG_task_create("COMM", 0, 100000000, NULL); - comm = MSG_task_isend(task, mailbox); - } + msg_task_t task = MSG_task_create("COMM", 0, 100000000, NULL); + msg_comm_t comm = MSG_task_isend(task, mailbox); MSG_process_sleep(0.5); @@ -29,6 +26,7 @@ static int master(int argc, char *argv[]) MSG_host_off(jupiter); if (comm) { + MSG_task_destroy(task); MSG_comm_wait(comm, -1); MSG_comm_destroy(comm); }