stats: fix the memory leak in stat_client.c 30/37730/3
authorAndrew Yourtchenko <ayourtch@gmail.com>
Mon, 28 Nov 2022 17:56:16 +0000 (17:56 +0000)
committerOle Tr�an <otroan@employees.org>
Tue, 29 Nov 2022 13:48:45 +0000 (13:48 +0000)
commit3f885f97f0bb812296cb549acd3c4b8fc17de0c9
treeac5b7120498d6982b19911b775b3f7b43d1e0102
parent6db2758611dd5f1cf82c0bf78cfb95230ed2786f
stats: fix the memory leak in stat_client.c

The issue can be reproduced by running "vpp_get_stats tightpoll"

The root cause is that the control flow discards the "result" struct
being prepared, along with pointer its allocated name.
This results in a memory leak.

Type: fix
Change-Id: Ibf884e92314f19b983a0159fc1257b3fa0110443
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
src/vpp-api/client/stat_client.c