From 2dacd344720d07a79a3116387618bee9c0b63fa2 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Thu, 21 Nov 2013 13:43:01 +0100 Subject: [PATCH 1/1] Fix delete/free mismatch. --- src/surf/surf_routing.cpp | 2 +- src/surf/surf_routing_full.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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); } -- 2.20.1