aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/perfmon
diff options
context:
space:
mode:
authorKlement Sekera <ksekera@cisco.com>2021-10-26 11:41:10 +0200
committerKlement Sekera <ksekera@cisco.com>2021-10-26 11:42:57 +0200
commitdec79ecf39c95054f3c7fbbf6019a032410a0231 (patch)
tree1cf4b7b0ae2bf817af15cd54bed9680c2c91ba14 /src/plugins/perfmon
parent3effadc66ff8acb2e5c83645faec411de59332c2 (diff)
perfmon: properly unmap mmapped pages
Add missing array index so that actual mmapped pages are unmpapped instead of attempting to unmap array holding those pages. Type: fix Signed-off-by: Klement Sekera <ksekera@cisco.com> Change-Id: Ib8709cce1bcbfb505307c140266834b284af796c
Diffstat (limited to 'src/plugins/perfmon')
-rw-r--r--src/plugins/perfmon/perfmon.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/perfmon/perfmon.c b/src/plugins/perfmon/perfmon.c
index 4a220c7a233..799659d8338 100644
--- a/src/plugins/perfmon/perfmon.c
+++ b/src/plugins/perfmon/perfmon.c
@@ -70,7 +70,7 @@ perfmon_reset (vlib_main_t *vm)
vec_free (tr->node_stats);
for (int j = 0; j < PERF_MAX_EVENTS; j++)
if (tr->mmap_pages[j])
- munmap (tr->mmap_pages, page_size);
+ munmap (tr->mmap_pages[j], page_size);
}
vec_free (pm->thread_runtimes);