lib/telemetry: fix memory leak
PATCH 1/1 lib/telemetry: fix memory leak
Free the values pointer before returning from rte_telemetry_command_ports_all_stat_values() to avoid memory leak.
Signed-off-by Reshma Pattan <[email protected]>
--- lib/librte_telemetry/rte_telemetry_parser.c | 1 + 1 file changed, 1 insertion(+)
lib/librte_telemetry/rte_telemetry_parser.c +1 -0
@@ -342,6 +342,7 @@ rte_telemetry_command_ports_all_stat_values(struct telemetry_impl *telemetry, goto fail; } +free (values);return 0 ; fail:
Signature · 1 line
2.21.0
Quoted 18 lines · Reshma Pattan
Free the
valuespointer before returning fromrte_telemetry_command_ports_all_stat_values()to avoid memory leak.Signed-off-by Reshma Pattan <[email protected]>--- lib/librte_telemetry/rte_telemetry_parser.c | 1 + 1 file changed, 1 insertion(+)lib/librte_telemetry/rte_telemetry_parser.c +0
-0
lib/librte_telemetry/rte_telemetry_parser.c rte_telemetry_command_ports_all_stat_values(struct telemetry_impl *telemetry, · line 348
Quoted 7 lines
lib/librte_telemetry/rte_telemetry_parser.c +1
-0@@ -342,6 +342,7 @@ rte_telemetry_command_ports_all_stat_values(struct telemetry_impl *telemetry, goto fail; } +free (values);return 0 ; fail:
Acked-by Kevin Laatz <[email protected]>
Thomas Monjalon
Applied31/05/2019 15:15, Laatz, Kevin:
Quoted 5 lines · Reshma Pattan
Quoted 4 lines
Free the
valuespointer before returning fromrte_telemetry_command_ports_all_stat_values()to avoid memory leak.
Quoted 7 lines
Quoted 5 lines
Signed-off-by Reshma Pattan <[email protected]>Acked-by Kevin Laatz <[email protected]>
Applied, thanks