summaryrefslogtreecommitdiffstats
path: root/src/vlib/stat_weak_inlines.h
diff options
context:
space:
mode:
authorOle Troan <ot@cisco.com>2019-06-16 12:33:51 +0200
committerNeale Ranns <nranns@cisco.com>2019-06-18 13:01:15 +0000
commit92e3082199d10add866894e86a9762d79a3536c4 (patch)
tree224d269fba3ec3b0c5ca456a7ede032d4163335d /src/vlib/stat_weak_inlines.h
parentae8819f0a426953aa7ebf97c2e26940525b55fb1 (diff)
stats: fix memory leakage when adding / deleting interfaces
This fixes two leaks in registering errors in the stats segment. - The error name created by vlib_register_errors() was not freed. - Duplicate error names (when interface readded) was added to the vector. This fix also adds memory usage statistics for the statistics segment as /mem/statseg/{used, total} Change-Id: Ife98d5fc5baef5bdae426a5a1eef428af2b9ab8a Type: fix Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'src/vlib/stat_weak_inlines.h')
-rw-r--r--src/vlib/stat_weak_inlines.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vlib/stat_weak_inlines.h b/src/vlib/stat_weak_inlines.h
index 5c04610ef13..d288a04c477 100644
--- a/src/vlib/stat_weak_inlines.h
+++ b/src/vlib/stat_weak_inlines.h
@@ -32,10 +32,10 @@ void
vlib_stats_pop_heap (void *notused, void *notused2, u32 i, int type)
{
};
-void vlib_stats_register_error_index (u8 *, u64 *, u64)
+void vlib_stats_register_error_index (void *, u8 *, u64 *, u64)
__attribute__ ((weak));
void
-vlib_stats_register_error_index (u8 * notused, u64 * notused2, u64 notused3)
+vlib_stats_register_error_index (void * notused, u8 * notused2, u64 * notused3, u64 notused4)
{
};