]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
regmap: Fix memory leak from regmap_register_patch
authorCharles Keepax <ckeepax@opensource.cirrus.com>
Wed, 17 Jun 2020 15:21:29 +0000 (16:21 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 17 Jun 2020 16:12:11 +0000 (17:12 +0100)
commit95b2c3ec4cb1689db2389c251d39f64490ba641c
tree4cf411c215ccdf92ece29794cff24ddbb376d320
parente680a4098f6404191e0e438a9758715b0bff6d7f
regmap: Fix memory leak from regmap_register_patch

When a register patch is registered the reg_sequence is copied but the
memory allocated is never freed. Add a kfree in regmap_exit to clean it
up.

Fixes: 22f0d90a3482 ("regmap: Support register patch sets")
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20200617152129.19655-1-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/base/regmap/regmap.c