From: Ole Troan Date: Tue, 3 Sep 2019 18:58:08 +0000 (+0200) Subject: stats: memory leak with per-node-counters on X-Git-Tag: v20.05-rc0~892 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=b6fde4a8bae474c6b73d08d223028f42e396d452;hp=a03d25d327ed9db40922cfcf247c3ee793c4754d;p=vpp.git stats: memory leak with per-node-counters on vlib_node_get_nodes() creates a duplicate node structure which was never freed. Type: fix Fixes: 1ddbc0138b Signed-off-by: Ole Troan Change-Id: Ib1200854937faaa694b398607d2f0ba65aa81c01 --- diff --git a/src/vpp/stats/stat_segment.c b/src/vpp/stats/stat_segment.c index bf970506d59..bb533d19118 100644 --- a/src/vpp/stats/stat_segment.c +++ b/src/vpp/stats/stat_segment.c @@ -527,7 +527,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