[PATCH v1] perf test: Add missing __exit calls in tool/hwmon tests

From: Ian Rogers
Date: Fri Nov 15 2024 - 15:13:13 EST


Address sanitizer flagged the missing parse_events_error__exit when
testing on ARM.

Signed-off-by: Ian Rogers <irogers@xxxxxxxxxx>
---
tools/perf/tests/hwmon_pmu.c | 1 +
tools/perf/tests/tool_pmu.c | 1 +
2 files changed, 2 insertions(+)

diff --git a/tools/perf/tests/hwmon_pmu.c b/tools/perf/tests/hwmon_pmu.c
index 5c4114354c65..9f44093f18df 100644
--- a/tools/perf/tests/hwmon_pmu.c
+++ b/tools/perf/tests/hwmon_pmu.c
@@ -194,6 +194,7 @@ static int do_test(size_t i, bool with_pmu, bool with_alias)
}

out:
+ parse_events_error__exit(&err);
evlist__delete(evlist);
return ret;
}
diff --git a/tools/perf/tests/tool_pmu.c b/tools/perf/tests/tool_pmu.c
index 46896b485abf..187942b749b7 100644
--- a/tools/perf/tests/tool_pmu.c
+++ b/tools/perf/tests/tool_pmu.c
@@ -66,6 +66,7 @@ static int do_test(enum tool_pmu_event ev, bool with_pmu)
}

out:
+ parse_events_error__exit(&err);
evlist__delete(evlist);
return ret;
}
--
2.47.0.338.g60cca15819-goog