From: Martin Quinson Date: Wed, 20 Apr 2016 09:55:59 +0000 (+0200) Subject: Plug 2 memleaks X-Git-Tag: v3_13~44 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/53f719520dac91270a2335ab6c48f5ef948b6828 Plug 2 memleaks --- diff --git a/src/surf/AsImpl.cpp b/src/surf/AsImpl.cpp index 3a9f80e595..12d2c2f4cd 100644 --- a/src/surf/AsImpl.cpp +++ b/src/surf/AsImpl.cpp @@ -210,6 +210,7 @@ namespace simgrid { getRouteRecursive(src, route.gw_src, links, latency); for (auto link: *route.link_list) links->push_back(link); + delete route.link_list; /* If dest gateway is not our destination, we have to recursively find our way from this point */ if (route.gw_dst != dst) diff --git a/src/surf/xml/surfxml_sax_cb.cpp b/src/surf/xml/surfxml_sax_cb.cpp index 3d2e6a3aad..7e8c9278bb 100644 --- a/src/surf/xml/surfxml_sax_cb.cpp +++ b/src/surf/xml/surfxml_sax_cb.cpp @@ -781,6 +781,7 @@ void ETag_surfxml_ASroute(void){ } sg_platf_new_route(&ASroute); + delete ASroute.link_list; } void ETag_surfxml_bypassRoute(void){