提交 f75dcc87 编写于 作者: T Takashi Iwai

ALSA: hda - Fix memory leak at codec creation

The codec->modelname field is allocated twice in snd_hda_codec_new().
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 e46b0c8c
......@@ -972,8 +972,6 @@ int /*__devinit*/ snd_hda_codec_new(struct hda_bus *bus, unsigned int codec_addr
snd_hda_codec_read(codec, nid, 0,
AC_VERB_GET_SUBSYSTEM_ID, 0);
}
if (bus->modelname)
codec->modelname = kstrdup(bus->modelname, GFP_KERNEL);
/* power-up all before initialization */
hda_set_power_state(codec,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册