Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
And 2 memleaks in simdag examples
authorMartin Quinson <martin.quinson@loria.fr>
Sun, 14 Aug 2016 21:17:23 +0000 (23:17 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Sun, 14 Aug 2016 21:17:23 +0000 (23:17 +0200)
examples/simdag/availability/sd_availability.c
examples/simdag/daxload/sd_daxload.c

index c6c053a..f5993ca 100644 (file)
@@ -92,6 +92,7 @@ int main(int argc, char **argv)
       if (SD_task_get_state(task)==SD_DONE)
         SD_task_destroy(task);
     }
       if (SD_task_get_state(task)==SD_DONE)
         SD_task_destroy(task);
     }
+    xbt_dynar_free(&changed_tasks);
   }
   SD_exit();
   xbt_free(hosts);
   }
   SD_exit();
   xbt_free(hosts);
index ed2eb41..50391f4 100644 (file)
@@ -81,7 +81,9 @@ int main(int argc, char **argv)
   XBT_INFO("------------------- Run the schedule ---------------------------");
   SD_simulate(-1);
   XBT_INFO("------------------- Produce the trace file---------------------------");
   XBT_INFO("------------------- Run the schedule ---------------------------");
   SD_simulate(-1);
   XBT_INFO("------------------- Produce the trace file---------------------------");
-  XBT_INFO("Producing the trace of the run into %s", xbt_basename(tracefilename));
+  char * basename = xbt_basename(tracefilename);
+  XBT_INFO("Producing the trace of the run into %s", basename);
+  free(basename);
   FILE *out = fopen(tracefilename, "w");
   xbt_assert(out, "Cannot write to %s", tracefilename);
   free(tracefilename);
   FILE *out = fopen(tracefilename, "w");
   xbt_assert(out, "Cannot write to %s", tracefilename);
   free(tracefilename);