Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aa3d75d8 authored by Takashi Iwai's avatar Takashi Iwai Committed by Takashi Iwai
Browse files

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: default avatarTakashi Iwai <tiwai@suse.de>
parent 51721f70
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -119,8 +119,10 @@ static int snd_pdacf_probe(struct pcmcia_device *link)
	}
	}


	pdacf = snd_pdacf_create(card);
	pdacf = snd_pdacf_create(card);
	if (! pdacf)
	if (!pdacf) {
		snd_card_free(card);
		return -EIO;
		return -EIO;
	}


	if (snd_device_new(card, SNDRV_DEV_LOWLEVEL, pdacf, &ops) < 0) {
	if (snd_device_new(card, SNDRV_DEV_LOWLEVEL, pdacf, &ops) < 0) {
		kfree(pdacf);
		kfree(pdacf);