Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
plug a bunch of memleaks in SD examples
[simgrid.git] / examples / simdag / dag-dotload / sd_dag-dotload.c
index a2006ba..2f88d5e 100644 (file)
@@ -60,7 +60,7 @@ int main(int argc, char **argv)
 
   /* Schedule them all on the first workstation */
   XBT_INFO("------------------- Schedule tasks ---------------------------");
-  const sg_host_t *ws_list = sg_host_list();
+  sg_host_t *ws_list = sg_host_list();
 
   int count = sg_host_count();
   xbt_dynar_foreach(dot, cursor, task) {
@@ -71,6 +71,7 @@ int main(int argc, char **argv)
         SD_task_schedulel(task, 1, ws_list[cursor % count]);
     }
   }
+  xbt_free(ws_list);
 
   XBT_INFO("------------------- Run the schedule ---------------------------");
   SD_simulate(-1);