perf list: Fix memory leaks in print_tracepoint_events()
authorNamhyung Kim <namhyung@kernel.org>
Thu, 27 Apr 2023 23:05:01 +0000 (16:05 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 2 May 2023 11:36:14 +0000 (08:36 -0300)
commit7586d11d36fad5e6a28736be7ac8f9495e28289a
tree9b55c0336a6e3589dfd240f59292ba94c542b9c5
parentb9f82b5c63bf5390da19e879275a792a959a8dac
perf list: Fix memory leaks in print_tracepoint_events()

It should free entries (not only the array) filled by scandirat()
after use.

Reviewed-by: Ian Rogers <irogers@google.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20230427230502.1526136-1-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/print-events.c