Skip to content

Commit

Permalink
telemetry: fix memory leak
Browse files Browse the repository at this point in the history
[ upstream commit 05682bd ]

Free the `values` pointer before returning
from rte_telemetry_command_ports_all_stat_values()
to avoid memory leak.

Fixes: c12cefa ("telemetry: fix mapping of statistics")

Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Acked-by: Kevin Laatz <kevin.laatz@intel.com>
  • Loading branch information
reshmapattan authored and kevintraynor committed Jun 24, 2019
1 parent 61f8856 commit e3148f5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/librte_telemetry/rte_telemetry_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ rte_telemetry_command_ports_all_stat_values(struct telemetry_impl *telemetry,
goto fail;
}

free(values);
return 0;

fail:
Expand Down

0 comments on commit e3148f5

Please sign in to comment.