Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use action_free to free the actions
[simgrid.git] / src / simdag / sd_task.c
index c8961de..8de0fdc 100644 (file)
@@ -14,6 +14,7 @@ static void __SD_task_destroy_scheduling_data(SD_task_t task);
  *
  * \param name the name of the task (can be \c NULL)
  * \param data the user data you want to associate with the task (can be \c NULL)
+ * \param amount amount of the task
  * \return the new task
  * \see SD_task_destroy()
  */
@@ -583,6 +584,9 @@ void SD_task_destroy(SD_task_t task) {
   if (task->name != NULL)
     xbt_free(task->name);
 
+  if (task->surf_action != NULL)
+    surf_workstation_resource->common_public->action_free(task->surf_action);
+
   xbt_dynar_free(&task->tasks_before);
   xbt_dynar_free(&task->tasks_after);
   xbt_free(task);