From: Arnaud Giersch Date: Sat, 9 Sep 2017 14:28:26 +0000 (+0200) Subject: Fix use-ater-free. X-Git-Tag: v3_17~158 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/2e490cd7e982eb004e8fd7f1c37b1f8154edf01a Fix use-ater-free. --- diff --git a/src/surf/sg_platf.cpp b/src/surf/sg_platf.cpp index f8d7e4d95b..97ce0b11fd 100644 --- a/src/surf/sg_platf.cpp +++ b/src/surf/sg_platf.cpp @@ -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); - delete link->properties; } if (link->latency_trace) @@ -146,6 +145,7 @@ void sg_platf_new_link(LinkCreationArgs* link) if (link->state_trace) l->setStateTrace(link->state_trace); } + delete link->properties; } void sg_platf_new_cluster(ClusterCreationArgs* cluster)