From: agiersch Date: Tue, 22 Feb 2011 13:51:45 +0000 (+0000) Subject: surf_routing: free coordinates elements. X-Git-Tag: v3.6_beta2~247 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/3a7c706f9b266fe9faee94ab0098bd3090e25e56 surf_routing: free coordinates elements. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@9696 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/surf/surf_routing.c b/src/surf/surf_routing.c index db11b969ce..f921c14d85 100644 --- a/src/surf/surf_routing.c +++ b/src/surf/surf_routing.c @@ -234,9 +234,9 @@ static void parse_S_host(const char *host_id, const char* coord) (void *) info, xbt_free); if (strcmp(coord,"")) { - xbt_dynar_t ctn = xbt_str_split_str(coord, " "); - xbt_dynar_shrink(ctn,0); - xbt_dict_set (coordinates,host_id,ctn,NULL); + xbt_dynar_t ctn = xbt_str_split_str(coord, " "); + xbt_dynar_shrink(ctn, 0); + xbt_dict_set(coordinates, host_id, ctn, xbt_dynar_free_voidp); } } @@ -297,9 +297,9 @@ static void parse_S_router(void) xbt_dict_set(global_routing->where_network_elements, A_surfxml_router_id, (void *) info, xbt_free); if (strcmp(A_surfxml_router_coordinates,"")) { - xbt_dynar_t ctn = xbt_str_split_str(A_surfxml_router_coordinates, " "); - xbt_dynar_shrink(ctn,0); - xbt_dict_set (coordinates,A_surfxml_router_id,ctn,NULL); + xbt_dynar_t ctn = xbt_str_split_str(A_surfxml_router_coordinates, " "); + xbt_dynar_shrink(ctn, 0); + xbt_dict_set(coordinates, A_surfxml_router_id, ctn, xbt_dynar_free_voidp); } } @@ -549,10 +549,10 @@ static void parse_S_AS_XML(void) parse_S_AS(A_surfxml_AS_id, A_surfxml_AS_routing); if (strcmp(A_surfxml_AS_coordinates,"")) { - XBT_DEBUG("%s coordinates : %s",A_surfxml_AS_id,A_surfxml_AS_coordinates); - xbt_dynar_t ctn = xbt_str_split_str(A_surfxml_AS_coordinates, " "); - xbt_dynar_shrink(ctn,0); - xbt_dict_set (coordinates,A_surfxml_AS_id,ctn,NULL); + XBT_DEBUG("%s coordinates : %s", A_surfxml_AS_id, A_surfxml_AS_coordinates); + xbt_dynar_t ctn = xbt_str_split_str(A_surfxml_AS_coordinates, " "); + xbt_dynar_shrink(ctn, 0); + xbt_dict_set(coordinates, A_surfxml_AS_id, ctn, xbt_dynar_free_voidp); } }