diff options
author | Takashi Iwai <tiwai@suse.de> | 2012-06-26 09:00:20 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-06-26 09:00:20 -0400 |
commit | 59cad16bc6deb85bd2a464da92bbaae289f0286f (patch) | |
tree | 543a57c1852ec9800f80e418da5c1e739891f12a /sound/pci/hda/hda_codec.c | |
parent | ee48df57c920ab876dd8cf0dcfe5b8893b98e934 (diff) |
ALSA: hda - Fix memory leaks at module unload
Some caches aren't released properly at module unloading time.
Cc: <stable@vger.kernel.org> [v3.4+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_codec.c')
-rw-r--r-- | sound/pci/hda/hda_codec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 7504e62188d6..854dd0c25f89 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) | |||
1184 | { | 1184 | { |
1185 | if (!codec) | 1185 | if (!codec) |
1186 | return; | 1186 | return; |
1187 | snd_hda_jack_tbl_clear(codec); | ||
1187 | restore_init_pincfgs(codec); | 1188 | restore_init_pincfgs(codec); |
1188 | #ifdef CONFIG_SND_HDA_POWER_SAVE | 1189 | #ifdef CONFIG_SND_HDA_POWER_SAVE |
1189 | cancel_delayed_work(&codec->power_work); | 1190 | cancel_delayed_work(&codec->power_work); |
@@ -1192,6 +1193,7 @@ static void snd_hda_codec_free(struct hda_codec *codec) | |||
1192 | list_del(&codec->list); | 1193 | list_del(&codec->list); |
1193 | snd_array_free(&codec->mixers); | 1194 | snd_array_free(&codec->mixers); |
1194 | snd_array_free(&codec->nids); | 1195 | snd_array_free(&codec->nids); |
1196 | snd_array_free(&codec->cvt_setups); | ||
1195 | snd_array_free(&codec->conn_lists); | 1197 | snd_array_free(&codec->conn_lists); |
1196 | snd_array_free(&codec->spdif_out); | 1198 | snd_array_free(&codec->spdif_out); |
1197 | codec->bus->caddr_tbl[codec->addr] = NULL; | 1199 | codec->bus->caddr_tbl[codec->addr] = NULL; |