diff options
author | Takashi Iwai <tiwai@suse.de> | 2012-10-10 08:50:35 +0200 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2012-10-30 23:26:41 +0000 |
commit | 311a597eb29216e6b61db30ddc729fd670459e8c (patch) | |
tree | 48a85f0cbb035cb9f73c24450f9a8964a127d853 /sound/pci/hda | |
parent | 814a7833df19e1de7447f870ae890adb12561627 (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/pci/hda')
-rw-r--r-- | sound/pci/hda/patch_cirrus.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c index ec0518ec9a5..e4492786228 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; } |