From: Takashi Iwai Date: Tue, 26 Jun 2012 13:00:20 +0000 (+0200) Subject: ALSA: hda - Fix memory leaks at module unload X-Git-Tag: v3.5-rc5~19^2~2 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=59cad16bc6deb85bd2a464da92bbaae289f0286f;p=~emulex%2Finfiniband.git ALSA: hda - Fix memory leaks at module unload Some caches aren't released properly at module unloading time. Cc: [v3.4+] Signed-off-by: Takashi Iwai --- diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 7504e62188d..854dd0c25f8 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@ -1184,6 +1184,7 @@ static void snd_hda_codec_free(struct hda_codec *codec) { if (!codec) return; + snd_hda_jack_tbl_clear(codec); restore_init_pincfgs(codec); #ifdef CONFIG_SND_HDA_POWER_SAVE cancel_delayed_work(&codec->power_work); @@ -1192,6 +1193,7 @@ static void snd_hda_codec_free(struct hda_codec *codec) list_del(&codec->list); snd_array_free(&codec->mixers); snd_array_free(&codec->nids); + snd_array_free(&codec->cvt_setups); snd_array_free(&codec->conn_lists); snd_array_free(&codec->spdif_out); codec->bus->caddr_tbl[codec->addr] = NULL;