diff options
author | Duncan Eastoe <duncan@graphiant.com> | 2022-11-30 21:16:13 +0000 |
---|---|---|
committer | Dave Wallace <dwallacelf@gmail.com> | 2023-05-19 21:17:37 +0000 |
commit | cf214cc6005ad53371bfbce9901b04bfa116207b (patch) | |
tree | a39b4b2b334e859fb4edf01e29c49f977382e466 /src/vpp-api/client/stat_client.c | |
parent | e211ac4886d0ae51c08f77c76ed37b76f01f7629 (diff) |
stats: fix memory leak in stat_segment_dump_r()
The built stat_segment_data_t is leaked if stat_segment_access_end()
returns false.
Type: fix
Signed-off-by: Duncan Eastoe <duncan@graphiant.com>
Change-Id: I70adabbe7947d3e8a798cdfb3eaa14c683dce9da
Diffstat (limited to 'src/vpp-api/client/stat_client.c')
-rw-r--r-- | src/vpp-api/client/stat_client.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/vpp-api/client/stat_client.c b/src/vpp-api/client/stat_client.c index 1c31ea0cb23..359813f8d57 100644 --- a/src/vpp-api/client/stat_client.c +++ b/src/vpp-api/client/stat_client.c @@ -433,6 +433,8 @@ stat_segment_dump_r (uint32_t * stats, stat_client_main_t * sm) fprintf (stderr, "Epoch changed while reading, invalid results\n"); // TODO increase counter + if (res) + stat_segment_data_free (res); return 0; } |