ASoC: soc-core: Fix codec->name memory leak
authorDimitris Papastamos <dp@opensource.wolfsonmicro.com>
Thu, 21 Oct 2010 12:19:45 +0000 (13:19 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Thu, 21 Oct 2010 20:47:38 +0000 (13:47 -0700)
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>
sound/soc/soc-core.c

index 862b1af5fbdf8dde9f70510265872a4298b96eca..70d9a7394b2b35fde32e812108dadf86031a95c0 100644 (file)
@@ -3299,6 +3299,7 @@ found:
 
        if (codec->reg_cache)
                kfree(codec->reg_cache);
+       kfree(codec->name);
        kfree(codec);
 }
 EXPORT_SYMBOL_GPL(snd_soc_unregister_codec);