stats: memory leak with per-node-counters on 75/23975/1
authorOle Troan <ot@cisco.com>
Tue, 3 Sep 2019 18:58:08 +0000 (20:58 +0200)
committersteven luong <sluong@cisco.com>
Thu, 12 Dec 2019 21:27:45 +0000 (21:27 +0000)
vlib_node_get_nodes() creates a duplicate node structure which was never freed.

Type: fix
Fixes: 1ddbc0138b
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: Ib1200854937faaa694b398607d2f0ba65aa81c01
(cherry picked from commit b6fde4a8bae474c6b73d08d223028f42e396d452)

src/vpp/stats/stat_segment.c

index 442a750..3f6bbcb 100644 (file)
@@ -515,7 +515,10 @@ update_node_counters (stat_segment_main_t * sm)
          c[n->index] =
            n->stats_total.suspends - n->stats_last_clear.suspends;
        }
+      vec_free (node_dups[j]);
     }
+  vec_free (node_dups);
+  vec_free (stat_vms);
 }
 
 static void