]> git.baikalelectronics.ru Git - kernel.git/commit
perf jevents: Free the sys_event_tables list after processing entries
authorLike Xu <likexu@tencent.com>
Tue, 28 Sep 2021 10:29:38 +0000 (18:29 +0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 5 Oct 2021 17:48:10 +0000 (14:48 -0300)
commitc76512027e4df5e111eb5bed3007891da5439ca4
tree8660ba1ef06c6eb9911d0c7976f3a9d6e3986b69
parentaa41c90d53ffa4801901e93c836128d3448d9206
perf jevents: Free the sys_event_tables list after processing entries

The compiler reports that free_sys_event_tables() is dead code.

But according to the semantics, the "LIST_HEAD(sys_event_tables)" should
also be released, just like we do with 'arch_std_events' in main().

Fixes: 32ccb717bdc87c0d ("perf vendor events: Add support for arch standard events")
Signed-off-by: Like Xu <likexu@tencent.com>
Reviewed-by: John Garry <john.garry@huawei.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lore.kernel.org/lkml/20210928102938.69681-1-likexu@tencent.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/pmu-events/jevents.c