Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
plug leaks
[simgrid.git] / examples / msg / platform-failures / platform-failures.c
index 1259ff4..6875eb0 100644 (file)
@@ -117,9 +117,11 @@ static int worker(int argc, char *argv[])
       retcode = MSG_task_execute(task);
       if (retcode == MSG_OK) {
         XBT_INFO("\"%s\" done", MSG_task_get_name(task));
+        free(task->data);
         MSG_task_destroy(task);
       } else if (retcode == MSG_HOST_FAILURE) {
         XBT_INFO("Gloups. The cpu on which I'm running just turned off!. See you!");
+        free(task->data);
         MSG_task_destroy(task);
         return 0;
       } else {