Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[trace] fix another memory leak when graph extraction is used with option "one link...
authorschnorr <Lucas.Schnorr@imag.fr>
Mon, 26 Mar 2012 07:23:32 +0000 (09:23 +0200)
committerschnorr <Lucas.Schnorr@imag.fr>
Mon, 26 Mar 2012 07:23:32 +0000 (09:23 +0200)
src/instr/instr_routing.c

index bbe392c..fa8b22c 100644 (file)
@@ -151,7 +151,10 @@ static void recursiveGraphExtraction (AS_t rc, container_t container, xbt_dict_t
 
       //user might want to extract a graph using routes with only one link
       //see --cfg=tracing/onelink_only:1 or --help-tracing for details
-      if (TRACE_onelink_only() && xbt_dynar_length (route->link_list) > 1) continue;
+      if (TRACE_onelink_only() && xbt_dynar_length (route->link_list) > 1){
+        generic_free_route(route);
+        continue;
+      }
 
       //traverse the route connecting the containers
       unsigned int cpt;