Commit 59cad16b authored by Takashi Iwai's avatar Takashi Iwai

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: default avatarTakashi Iwai <tiwai@suse.de>
parent ee48df57
...@@ -1184,6 +1184,7 @@ static void snd_hda_codec_free(struct hda_codec *codec) ...@@ -1184,6 +1184,7 @@ static void snd_hda_codec_free(struct hda_codec *codec)
{ {
if (!codec) if (!codec)
return; return;
snd_hda_jack_tbl_clear(codec);
restore_init_pincfgs(codec); restore_init_pincfgs(codec);
#ifdef CONFIG_SND_HDA_POWER_SAVE #ifdef CONFIG_SND_HDA_POWER_SAVE
cancel_delayed_work(&codec->power_work); cancel_delayed_work(&codec->power_work);
...@@ -1192,6 +1193,7 @@ static void snd_hda_codec_free(struct hda_codec *codec) ...@@ -1192,6 +1193,7 @@ static void snd_hda_codec_free(struct hda_codec *codec)
list_del(&codec->list); list_del(&codec->list);
snd_array_free(&codec->mixers); snd_array_free(&codec->mixers);
snd_array_free(&codec->nids); snd_array_free(&codec->nids);
snd_array_free(&codec->cvt_setups);
snd_array_free(&codec->conn_lists); snd_array_free(&codec->conn_lists);
snd_array_free(&codec->spdif_out); snd_array_free(&codec->spdif_out);
codec->bus->caddr_tbl[codec->addr] = NULL; codec->bus->caddr_tbl[codec->addr] = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment