Skip to content

Commit

Permalink
ALSA: pdaudiocf - Fix missing free in the error path
Browse files Browse the repository at this point in the history
Added the missing snd_card_free() in the error path of probe callback.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Takashi Iwai authored and tiwai committed Jan 12, 2009
1 parent 51721f7 commit aa3d75d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sound/pcmcia/pdaudiocf/pdaudiocf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit aa3d75d

Please sign in to comment.