Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Strings are already dup'ed by caller.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Mon, 21 Nov 2011 11:18:59 +0000 (12:18 +0100)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Wed, 23 Nov 2011 15:46:45 +0000 (16:46 +0100)
src/surf/surf_routing_floyd.c

index e094d6c..95292f8 100644 (file)
@@ -340,8 +340,8 @@ void model_floyd_parse_route(AS_t rc, const char *src,
                {
                        if(route->dst_gateway && route->src_gateway)
                        {
                {
                        if(route->dst_gateway && route->src_gateway)
                        {
-                          char *gw_src = xbt_strdup(route->src_gateway);
-                          char *gw_dst = xbt_strdup(route->dst_gateway);
+                          char *gw_src = route->src_gateway;
+                          char *gw_dst = route->dst_gateway;
                           route->src_gateway = gw_dst;
                           route->dst_gateway = gw_src;
                        }
                           route->src_gateway = gw_dst;
                           route->dst_gateway = gw_src;
                        }