git.openpandora.org
/
pandora-kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
814a783
)
ALSA: hda - Fix memory leaks at error path in patch_cirrus.c
author
Takashi Iwai
<tiwai@suse.de>
Wed, 10 Oct 2012 06:50:35 +0000
(08:50 +0200)
committer
Ben Hutchings
<ben@decadent.org.uk>
Tue, 30 Oct 2012 23:26:41 +0000
(23:26 +0000)
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>
sound/pci/hda/patch_cirrus.c
patch
|
blob
|
history
diff --git
a/sound/pci/hda/patch_cirrus.c
b/sound/pci/hda/patch_cirrus.c
index
ec0518e
..
e449278
100644
(file)
--- 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:
return 0;
error:
-
kfree(codec->sp
ec);
+
cs_free(cod
ec);
codec->spec = NULL;
return err;
}
codec->spec = NULL;
return err;
}
@@
-1949,7
+1949,7
@@
static int patch_cs421x(struct hda_codec *codec)
return 0;
error:
return 0;
error:
-
kfree(codec->sp
ec);
+
cs_free(cod
ec);
codec->spec = NULL;
return err;
}
codec->spec = NULL;
return err;
}