diff options
author | Richard Fitzgerald <rf@opensource.cirrus.com> | 2024-04-11 11:37:24 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2024-05-27 01:31:31 +0100 |
commit | c3820641da87442251e0c00b6874ef1022da8f58 (patch) | |
tree | 88164a8bae931458ac7563c55649f4817fa9fe69 /tools/perf/scripts/python/event_analyzing_sample.py | |
parent | 1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0 (diff) |
regmap: kunit: Fix memory leaks in gen_regmap() and gen_raw_regmap()
- Use kunit_kcalloc() to allocate the defaults table so that it will be
freed when the test case ends.
- kfree() the buf and *data buffers on the error paths.
- Use kunit_add_action_or_reset() instead of kunit_add_action() so that
if it fails it will call regmap_exit().
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://msgid.link/r/20240411103724.54063-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/event_analyzing_sample.py')
0 files changed, 0 insertions, 0 deletions