From: Reshma Pattan Date: Wed, 29 May 2019 12:43:17 +0000 (+0100) Subject: telemetry: fix memory leak X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=05682bddb603fad361836a3045328a0079601469;p=dpdk.git telemetry: fix memory leak Free the `values` pointer before returning from rte_telemetry_command_ports_all_stat_values() to avoid memory leak. Fixes: c12cefa379 ("telemetry: fix mapping of statistics") Cc: stable@dpdk.org Signed-off-by: Reshma Pattan Acked-by: Kevin Laatz --- diff --git a/lib/librte_telemetry/rte_telemetry_parser.c b/lib/librte_telemetry/rte_telemetry_parser.c index 9bc16eef47..e9297021a3 100644 --- a/lib/librte_telemetry/rte_telemetry_parser.c +++ b/lib/librte_telemetry/rte_telemetry_parser.c @@ -342,6 +342,7 @@ rte_telemetry_command_ports_all_stat_values(struct telemetry_impl *telemetry, goto fail; } + free(values); return 0; fail: