Skip to content

Commit

Permalink
ALSA: hda - Fix memory leak at codec creation
Browse files Browse the repository at this point in the history
The codec->modelname field is allocated twice in snd_hda_codec_new().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Takashi Iwai committed Jun 17, 2009
1 parent e46b0c8 commit f75dcc8
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions sound/pci/hda/hda_codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit f75dcc8

Please sign in to comment.