stats: fix memory leakage when adding / deleting interfaces 58/20158/6
authorOle Troan <ot@cisco.com>
Sun, 16 Jun 2019 10:33:51 +0000 (12:33 +0200)
committerNeale Ranns <nranns@cisco.com>
Tue, 18 Jun 2019 13:01:15 +0000 (13:01 +0000)
commit92e3082199d10add866894e86a9762d79a3536c4
tree224d269fba3ec3b0c5ca456a7ede032d4163335d
parentae8819f0a426953aa7ebf97c2e26940525b55fb1
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>
src/vlib/error.c
src/vlib/stat_weak_inlines.h
src/vpp/stats/stat_segment.c
src/vpp/stats/stat_segment.h
src/vppinfra/mem_dlmalloc.c
src/vppinfra/mheap.h
test/test_stats_client.py