Code Review
/
vpp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
e211ac4
)
stats: fix memory leak in stat_segment_dump_r()
50/37750/4
author
Duncan Eastoe
<duncan@graphiant.com>
Wed, 30 Nov 2022 21:16:13 +0000
(21:16 +0000)
committer
Dave Wallace
<dwallacelf@gmail.com>
Fri, 19 May 2023 21:17:37 +0000
(21:17 +0000)
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
src/vpp-api/client/stat_client.c
patch
|
blob
|
history
diff --git
a/src/vpp-api/client/stat_client.c
b/src/vpp-api/client/stat_client.c
index
1c31ea0
..
359813f
100644
(file)
--- 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;
}