From 9e83f2bd52f8734d049718e731c9ccda690ba366 Mon Sep 17 00:00:00 2001 From: Navarrop Date: Fri, 4 Nov 2011 12:54:57 +0100 Subject: [PATCH 1/1] Do the free into the right file. --- src/surf/surf_routing.c | 17 +++-------------- src/surf/surfxml_parse.c | 4 ++++ teshsuite/simdag/platforms/one_cluster.xml | 2 +- 3 files changed, 8 insertions(+), 15 deletions(-) diff --git a/src/surf/surf_routing.c b/src/surf/surf_routing.c index b9bb99ae22..78866cf617 100644 --- a/src/surf/surf_routing.c +++ b/src/surf/surf_routing.c @@ -1618,13 +1618,7 @@ void routing_parse_Scluster(void) xbt_dict_set(cluster_host_link,host_id,strdup(link_id),free); // XBT_INFO("key '%s' Value '%s'",host_id,link_id); ETag_surfxml_host(); - xbt_free(struct_host->V_host_id); - xbt_free(struct_host->V_host_coord); - xbt_free(struct_host); - ETag_surfxml_link(); - xbt_free(struct_lnk->V_link_id); - xbt_free(struct_lnk); break; @@ -1670,7 +1664,7 @@ void routing_parse_Scluster(void) struct_host->V_host_power_scale = 1.0; struct_host->V_host_core = struct_cluster->S_cluster_core; struct_host->V_host_state_initial = SURF_RESOURCE_ON; - struct_host->V_host_coord = xbt_strdup(""); + struct_host->V_host_coord = ""; STag_surfxml_host_cluster(); XBT_DEBUG(""); @@ -1707,13 +1701,8 @@ void routing_parse_Scluster(void) // XBT_INFO("key '%s' Value '%s'",host_id,link_id); ETag_surfxml_host(); - xbt_free(struct_host->V_host_id); - xbt_free(struct_host->V_host_coord); - xbt_free(struct_host); - ETag_surfxml_link(); - xbt_free(struct_lnk->V_link_id); - xbt_free(struct_lnk); + } break; @@ -1763,7 +1752,7 @@ void routing_parse_Scluster(void) STag_surfxml_link_cluster(); ETag_surfxml_link(); - free(link_backbone); +// free(link_backbone); } XBT_DEBUG(" "); diff --git a/src/surf/surfxml_parse.c b/src/surf/surfxml_parse.c index 582b6a63bd..c5e1479c69 100644 --- a/src/surf/surfxml_parse.c +++ b/src/surf/surfxml_parse.c @@ -319,6 +319,8 @@ void STag_surfxml_host_cluster(void){ } void ETag_surfxml_host(void){ surfxml_call_cb_functions(ETag_surfxml_host_cb_list); + xbt_free(struct_host->V_host_id); + xbt_free(struct_host); } void STag_surfxml_router(void){ @@ -432,6 +434,8 @@ void STag_surfxml_link_cluster(void){ } void ETag_surfxml_link(void){ surfxml_call_cb_functions(ETag_surfxml_link_cb_list); + xbt_free(struct_lnk->V_link_id); + xbt_free(struct_lnk); } void STag_surfxml_route(void){ diff --git a/teshsuite/simdag/platforms/one_cluster.xml b/teshsuite/simdag/platforms/one_cluster.xml index 42942395d0..e2c1eed1f2 100644 --- a/teshsuite/simdag/platforms/one_cluster.xml +++ b/teshsuite/simdag/platforms/one_cluster.xml @@ -3,7 +3,7 @@ -- 2.20.1