Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix use-ater-free.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Sat, 9 Sep 2017 14:28:26 +0000 (16:28 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Sat, 9 Sep 2017 19:55:25 +0000 (21:55 +0200)
src/surf/sg_platf.cpp

index f8d7e4d..97ce0b1 100644 (file)
@@ -136,7 +136,6 @@ void sg_platf_new_link(LinkCreationArgs* link)
     if (link->properties) {
       for (auto const& elm : *link->properties)
         l->setProperty(elm.first, elm.second);
     if (link->properties) {
       for (auto const& elm : *link->properties)
         l->setProperty(elm.first, elm.second);
-      delete link->properties;
     }
 
     if (link->latency_trace)
     }
 
     if (link->latency_trace)
@@ -146,6 +145,7 @@ void sg_platf_new_link(LinkCreationArgs* link)
     if (link->state_trace)
       l->setStateTrace(link->state_trace);
   }
     if (link->state_trace)
       l->setStateTrace(link->state_trace);
   }
+  delete link->properties;
 }
 
 void sg_platf_new_cluster(ClusterCreationArgs* cluster)
 }
 
 void sg_platf_new_cluster(ClusterCreationArgs* cluster)