Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1aafcd4d authored by Dimitris Papastamos's avatar Dimitris Papastamos Committed by Mark Brown
Browse files

ASoC: soc-core: Fix codec->name memory leak



Ensure that the codec->name is freed when unregistering the codec.

Signed-off-by: default avatarDimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent c429ffbe
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -3299,6 +3299,7 @@ void snd_soc_unregister_codec(struct device *dev)

	if (codec->reg_cache)
		kfree(codec->reg_cache);
	kfree(codec->name);
	kfree(codec);
}
EXPORT_SYMBOL_GPL(snd_soc_unregister_codec);