Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
fix dependency issue to prevent problems with make -jx
[simgrid.git] / teshsuite / msg / host_on_off_recv / host_on_off_recv.c
index 4d27e38..0df6ef0 100644 (file)
@@ -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);
   }