aboutsummaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-10-10 08:50:35 +0200
committerBen Hutchings <ben@decadent.org.uk>2012-10-30 23:26:41 +0000
commit311a597eb29216e6b61db30ddc729fd670459e8c (patch)
tree48a85f0cbb035cb9f73c24450f9a8964a127d853 /sound
parent814a7833df19e1de7447f870ae890adb12561627 (diff)
ALSA: hda - Fix memory leaks at error path in patch_cirrus.c
commit c5e0b6dbad9b4d18c561af90b384d02373f1c994 upstream. The proper destructor should be called at the error path. Signed-off-by: Takashi Iwai <tiwai@suse.de> [bwh: Backported to 3.2: drop the change to nonexistent patch_cs4213()] Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/patch_cirrus.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c
index ec0518ec9a55..e44927862284 100644
--- a/sound/pci/hda/patch_cirrus.c
+++ b/sound/pci/hda/patch_cirrus.c
@@ -1404,7 +1404,7 @@ static int patch_cs420x(struct hda_codec *codec)
return 0;
error:
- kfree(codec->spec);
+ cs_free(codec);
codec->spec = NULL;
return err;
}
@@ -1949,7 +1949,7 @@ static int patch_cs421x(struct hda_codec *codec)
return 0;
error:
- kfree(codec->spec);
+ cs_free(codec);
codec->spec = NULL;
return err;
}