Skip to contentSkip to conversation

perf tests hwmon_pmu: Remove double evlist__delete()

PATCH Applied Arnaldo Carvalho de Melo 2 participants 2 messages Nov 19, 2024 – Nov 22, 2024 perf events

lore
Share & tools
lore

Arnaldo Carvalho de Melo

author maintainer
#0 lore raw

PATCH 1/1 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")
Cc Adrian Hunter <[email protected]>
Cc Alexander Shishkin <[email protected]>
Cc Ian Rogers <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Kan Liang <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Peter Zijlstra <[email protected]>
---
 tools/perf/tests/hwmon_pmu.c | 2 --
 1 file changed, 2 deletions(-)
tools/perf/tests/hwmon_pmu.c +0 -2
index 1e5f93aaaf5f9210..d8ed00d45dd7249e 100644
@@ -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);
Signature · 4 lines
2.47.0


----- End forwarded message -----
maintainer Applied
#1 lore raw
Quoted 4 lines · Arnaldo Carvalho de Melo

In the error path when failing to parse events the evlist is being deleted twice, keep the one after the out label.

Applied to perf-tools-next, thanks!

Best regards,
Namhyung