Skip to content

Commit

Permalink
ASoC: soc-core: Fix codec->name memory leak
Browse files Browse the repository at this point in the history
Ensure that the codec->name is freed when unregistering the codec.

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Dimitris Papastamos authored and Mark Brown committed Oct 21, 2010
1 parent c429ffb commit 1aafcd4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sound/soc/soc-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 1aafcd4

Please sign in to comment.