diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-06-17 02:22:32 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-06-17 02:22:32 -0400 |
commit | f75dcc87feab791847605044311a4a8e9335da91 (patch) | |
tree | cdca84e632c6aabacbd63fc6432dee846133d90f /sound | |
parent | e46b0c8c08cd97eb8f9a523986908add3ece0cc6 (diff) |
ALSA: hda - Fix memory leak at codec creation
The codec->modelname field is allocated twice in snd_hda_codec_new().
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/hda_codec.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 562403a23488..462e2cedaa6a 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c | |||
@@ -972,8 +972,6 @@ int /*__devinit*/ snd_hda_codec_new(struct hda_bus *bus, unsigned int codec_addr | |||
972 | snd_hda_codec_read(codec, nid, 0, | 972 | snd_hda_codec_read(codec, nid, 0, |
973 | AC_VERB_GET_SUBSYSTEM_ID, 0); | 973 | AC_VERB_GET_SUBSYSTEM_ID, 0); |
974 | } | 974 | } |
975 | if (bus->modelname) | ||
976 | codec->modelname = kstrdup(bus->modelname, GFP_KERNEL); | ||
977 | 975 | ||
978 | /* power-up all before initialization */ | 976 | /* power-up all before initialization */ |
979 | hda_set_power_state(codec, | 977 | hda_set_power_state(codec, |