From: Arnaud Giersch Date: Thu, 21 Nov 2013 12:43:01 +0000 (+0100) Subject: Fix delete/free mismatch. X-Git-Tag: v3_11_beta~240 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/2dacd344720d07a79a3116387618bee9c0b63fa2?hp=6af809fdd97845671db6136b3903e0d543ab7217 Fix delete/free mismatch. --- diff --git a/src/surf/surf_routing.cpp b/src/surf/surf_routing.cpp index 568d33f9b9..e39b3e733a 100644 --- a/src/surf/surf_routing.cpp +++ b/src/surf/surf_routing.cpp @@ -1267,7 +1267,7 @@ void routing_exit(void) { return; xbt_dynar_free(&routing_platf->p_lastRoute); finalize_rec(routing_platf->p_root); - xbt_free(routing_platf); + delete routing_platf; } AS_t surf_AS_get_routing_root() { diff --git a/src/surf/surf_routing_full.cpp b/src/surf/surf_routing_full.cpp index 814aba7a9b..23b320f1e3 100644 --- a/src/surf/surf_routing_full.cpp +++ b/src/surf/surf_routing_full.cpp @@ -61,7 +61,7 @@ AsFull::~AsFull(){ /* Delete routing table */ for (i = 0; i < table_size; i++) for (j = 0; j < table_size; j++) - delete TO_ROUTE_FULL(i,j); + xbt_free(TO_ROUTE_FULL(i,j)); xbt_free(p_routingTable); }