Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix memleak
[simgrid.git] / src / surf / workstation_ptask_L07.cpp
index ce30298..3f9e00e 100644 (file)
@@ -339,7 +339,7 @@ ResourcePtr NetworkL07Model::createResource(const char *name,
                                  e_surf_link_sharing_policy_t
                                  policy, xbt_dict_t properties)
 {
-  LinkL07Ptr nw_link = new LinkL07(this, xbt_strdup(name), properties);
+  LinkL07Ptr nw_link = new LinkL07(this, name, properties);
   xbt_assert(!xbt_lib_get_or_null(link_lib, name, SURF_LINK_LEVEL),
               "Link '%s' declared several times in the platform file.",
               name);
@@ -441,8 +441,8 @@ void WorkstationL07Model::addTraces()
 
 WorkstationL07::WorkstationL07(WorkstationModelPtr model, const char* name, xbt_dict_t props, RoutingEdgePtr netElm, CpuPtr cpu)
   : Resource(model, name, props),
-    WorkstationCLM03Lmm(model, name, props, NULL, netElm, cpu),
-    WorkstationCLM03(model, name, props, NULL, netElm, cpu)
+    WorkstationCLM03(model, name, props, NULL, netElm, cpu),
+    WorkstationCLM03Lmm(model, name, props, NULL, netElm, cpu)
 {
 }