diff options
author | Ole Troan <ot@cisco.com> | 2019-09-03 20:58:08 +0200 |
---|---|---|
committer | Ole Trøan <otroan@employees.org> | 2019-09-26 13:17:19 +0000 |
commit | 2160efbaf11b0675e30fc1f901e116f88c0302f5 (patch) | |
tree | 483832fe026fff6ef35afcd704ebbc636c99c1e2 | |
parent | c395ff14327589a7e985c3a00110a8c43025fc57 (diff) |
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 <ot@cisco.com>
Change-Id: Ib1200854937faaa694b398607d2f0ba65aa81c01
(cherry picked from commit b6fde4a8bae474c6b73d08d223028f42e396d452)
-rw-r--r-- | src/vpp/stats/stat_segment.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/vpp/stats/stat_segment.c b/src/vpp/stats/stat_segment.c index 1328ea815ae..5dcb390e7ae 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 |