summaryrefslogtreecommitdiff
path: root/tools/perf
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@kernel.org>2024-11-19 16:34:31 -0300
committerNamhyung Kim <namhyung@kernel.org>2024-11-22 13:38:27 -0800
commit870748fa1fac5a397c26126bc32662e9249762c7 (patch)
tree65c52d463f75a35263ae5c7fdf9b00c13380598d /tools/perf
parent5f2c8f4e1070e474642b9dea104f531b8be52e1e (diff)
perf tests hwmon_pmu: Remove double evlist__delete()
In the error path when failing to parse events the evlist is being deleted twice, keep the one after the out label. Fixes: 531ee0fd4836994f ("perf test: Add hwmon "PMU" test") Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Link: https://lore.kernel.org/r/ZzzoJNNcJJVnPCCe@x1 Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Diffstat (limited to 'tools/perf')
-rw-r--r--tools/perf/tests/hwmon_pmu.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/tools/perf/tests/hwmon_pmu.c b/tools/perf/tests/hwmon_pmu.c
index 1e5f93aaaf5f..d8ed00d45dd7 100644
--- a/tools/perf/tests/hwmon_pmu.c
+++ b/tools/perf/tests/hwmon_pmu.c
@@ -155,8 +155,6 @@ static int do_test(size_t i, bool with_pmu, bool with_alias)
parse_events_error__init(&err);
ret = parse_events(evlist, str, &err);
if (ret) {
- evlist__delete(evlist);
-
pr_debug("FAILED %s:%d failed to parse event '%s', err %d\n",
__FILE__, __LINE__, str, ret);
parse_events_error__print(&err, str);