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

ALSA: pdaudiocf - Fix missing free in the error path

Added the missing snd_card_free() in the error path of probe callback.
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 51721f70
......@@ -119,8 +119,10 @@ static int snd_pdacf_probe(struct pcmcia_device *link)
}
pdacf = snd_pdacf_create(card);
if (! pdacf)
if (!pdacf) {
snd_card_free(card);
return -EIO;
}
if (snd_device_new(card, SNDRV_DEV_LOWLEVEL, pdacf, &ops) < 0) {
kfree(pdacf);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册