From: Takashi Iwai Date: Sun, 28 Dec 2008 15:59:41 +0000 (+0100) Subject: ALSA: pdaudiocf - Fix missing free in the error path X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=aa3d75d80de464cf23af1d068a5e22f1527b6957;p=deliverable%2Flinux.git 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: Takashi Iwai --- diff --git a/sound/pcmcia/pdaudiocf/pdaudiocf.c b/sound/pcmcia/pdaudiocf/pdaudiocf.c index 183f6615c68c..ec51569fd50d 100644 --- a/sound/pcmcia/pdaudiocf/pdaudiocf.c +++ b/sound/pcmcia/pdaudiocf/pdaudiocf.c @@ -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);