Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Do the free into the right file.
[simgrid.git] / src / surf / surfxml_parse.c
index 4c38b8d..c5e1479 100644 (file)
@@ -319,7 +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->V_host_id);
+       xbt_free(struct_host);
 }
 
 void STag_surfxml_router(void){
@@ -370,15 +371,7 @@ void ETag_surfxml_cluster(void){
        xbt_free(struct_cluster->V_cluster_prefix);
        xbt_free(struct_cluster->V_cluster_suffix);
        xbt_free(struct_cluster->V_cluster_radical);
-       struct_cluster->S_cluster_power = 0;
-       struct_cluster->S_cluster_core = 0;
-       struct_cluster->S_cluster_bw = 0;
-       struct_cluster->S_cluster_lat = 0;
-       struct_cluster->S_cluster_bb_bw = 0;
-       struct_cluster->S_cluster_bb_lat = 0;
        xbt_free(struct_cluster->S_cluster_router_id);
-       struct_cluster->V_cluster_sharing_policy = 0;
-       struct_cluster->V_cluster_bb_sharing_policy = 0;
        xbt_free(struct_cluster);
 }
 
@@ -441,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){