diff options
author | Florin Coras <fcoras@cisco.com> | 2021-02-26 13:24:47 -0800 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2021-02-26 22:47:00 +0000 |
commit | 7c7ed175eb74e76db69e4a887e5af1469d900ed5 (patch) | |
tree | 0632fc2d29a48aa2e3ca4fecdce4d93e8e224d9c | |
parent | 30fdf39628c095ed4a5d607079c1b18294050c56 (diff) |
vppinfra: mem leak in show memory main-heap
Type: fix
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I23d1dda86c781ac077dbee7cb0e1ddeaa328c660
-rw-r--r-- | src/vppinfra/linux/mem.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/vppinfra/linux/mem.c b/src/vppinfra/linux/mem.c index 15c5735d841..11a1e9ee45a 100644 --- a/src/vppinfra/linux/mem.c +++ b/src/vppinfra/linux/mem.c @@ -571,7 +571,7 @@ clib_mem_get_page_stats (void *start, clib_mem_page_sz_t log2_page_size, if (move_pages (0, n_pages, ptr, 0, status, 0) != 0) { stats->unknown = n_pages; - return; + goto done; } for (i = 0; i < n_pages; i++) @@ -586,6 +586,10 @@ clib_mem_get_page_stats (void *start, clib_mem_page_sz_t log2_page_size, else stats->unknown++; } + +done: + vec_free (status); + vec_free (ptr); } |