Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Potential bug fix.
authoralegrand <alegrand@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 12 Jun 2008 09:39:10 +0000 (09:39 +0000)
committeralegrand <alegrand@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 12 Jun 2008 09:39:10 +0000 (09:39 +0000)
It may have happened that this cleanup is not done.

git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@5612 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/msg/msg_mailbox.c

index 9cdb6d8..5a12459 100644 (file)
@@ -232,8 +232,11 @@ MSG_mailbox_get_task_ext(msg_mailbox_t mailbox, m_task_t * task,
       SIMIX_cond_wait(MSG_mailbox_get_cond(mailbox), h->simdata->mutex);
 
 
-    if (SIMIX_host_get_state(h_simdata->smx_host) == 0)
+    if (SIMIX_host_get_state(h_simdata->smx_host) == 0) {
+      MSG_mailbox_set_cond(mailbox, NULL);
+      SIMIX_cond_destroy(cond);
       MSG_RETURN(MSG_HOST_FAILURE);
+    }
 
     first_time = 0;
   }