aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOle Troan <ot@cisco.com>2019-09-03 20:58:08 +0200
committersteven luong <sluong@cisco.com>2019-12-12 21:27:45 +0000
commitae995d71ed27149c6f1602a204392ddc35e67c89 (patch)
treecef30f29e552ff061ea6e06aff0b9a309f7a30e1
parent11b5d24cde2a5ecbfed5925b2b748fd3dd955fc2 (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.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/vpp/stats/stat_segment.c b/src/vpp/stats/stat_segment.c
index 442a750ce7f..3f6bbcbb4f3 100644
--- a/src/vpp/stats/stat_segment.c
+++ b/src/vpp/stats/stat_segment.c
@@ -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