2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-23 20:53:53 +08:00

ALSA: hda - Fix missing va_end() call in snd_hda_codec_pcm_new()

Reported by coverity CID 1296024.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Takashi Iwai 2015-04-27 16:39:19 +02:00
parent 07b0e5d49d
commit 30e5f003ff

View File

@ -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;