Skip to content

Commit

Permalink
ALSA: hda - Fix missing va_end() call in snd_hda_codec_pcm_new()
Browse files Browse the repository at this point in the history
Reported by coverity CID 1296024.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
tiwai committed Apr 27, 2015
1 parent 07b0e5d commit 30e5f00
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sound/pci/hda/hda_codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -873,14 +873,15 @@ struct hda_pcm *snd_hda_codec_pcm_new(struct hda_codec *codec,
struct hda_pcm *pcm;
va_list args;

va_start(args, fmt);
pcm = kzalloc(sizeof(*pcm), GFP_KERNEL);
if (!pcm)
return NULL;

pcm->codec = codec;
kref_init(&pcm->kref);
va_start(args, fmt);
pcm->name = kvasprintf(GFP_KERNEL, fmt, args);
va_end(args);
if (!pcm->name) {
kfree(pcm);
return NULL;
Expand Down

0 comments on commit 30e5f00

Please sign in to comment.