summaryrefslogtreecommitdiff
path: root/sound/pci/hda
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-10-10 08:50:35 +0200
committerTakashi Iwai <tiwai@suse.de>2012-10-10 09:24:07 +0200
commitc5e0b6dbad9b4d18c561af90b384d02373f1c994 (patch)
tree41892b20e9e97d01ec4f75be924fd2ddce2972af /sound/pci/hda
parent7819d1c70eb6a57e43554d86e10b39d1e106ed65 (diff)
ALSA: hda - Fix memory leaks at error path in patch_cirrus.c
The proper destructor should be called at the error path. Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda')
-rw-r--r--sound/pci/hda/patch_cirrus.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c
index fc92819838a1..f441f53f0306 100644
--- a/sound/pci/hda/patch_cirrus.c
+++ b/sound/pci/hda/patch_cirrus.c
@@ -1444,7 +1444,7 @@ static int patch_cs420x(struct hda_codec *codec)
return 0;
error:
- kfree(codec->spec);
+ cs_free(codec);
codec->spec = NULL;
return err;
}
@@ -1989,7 +1989,7 @@ static int patch_cs4210(struct hda_codec *codec)
return 0;
error:
- kfree(codec->spec);
+ cs_free(codec);
codec->spec = NULL;
return err;
}
@@ -2014,7 +2014,7 @@ static int patch_cs4213(struct hda_codec *codec)
return 0;
error:
- kfree(codec->spec);
+ cs_free(codec);
codec->spec = NULL;
return err;
}