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 <reshma.pattan@intel.com>
Acked-by: Kevin Laatz <kevin.laatz@intel.com>
This commit is contained in:
Reshma Pattan 2019-05-29 13:43:17 +01:00 committed by Thomas Monjalon
parent 092a9de50b
commit 05682bddb6

View File

@ -342,6 +342,7 @@ rte_telemetry_command_ports_all_stat_values(struct telemetry_impl *telemetry,
goto fail;
}
free(values);
return 0;
fail: