Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
| inline |
side by side
stats: fix the memory leak in stat_client.c
[vpp.git]
/
src
/
vpp-api
/
client
/
stat_client.c
diff --git
a/src/vpp-api/client/stat_client.c
b/src/vpp-api/client/stat_client.c
index
2e8e1fa
..
5bb6e9f
100644
(file)
--- a/
src/vpp-api/client/stat_client.c
+++ b/
src/vpp-api/client/stat_client.c
@@
-287,6
+287,8
@@
copy_data (vlib_stats_entry_t *ep, u32 index2, char *name,
{
vlib_stats_entry_t *ep2;
ep2 = vec_elt_at_index (sm->directory_vector, ep->index1);
+ /* We do not intend to return the "result", avoid a leak */
+ free (result.name);
return copy_data (ep2, ep->index2, ep->name, sm);
}