Commit aa3d75d80de464cf23af1d068a5e22f1527b6957

Authored by Takashi Iwai
Committed by Takashi Iwai
1 parent 51721f70ac

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 <tiwai@suse.de>

Showing 1 changed file with 3 additions and 1 deletions Side-by-side Diff

sound/pcmcia/pdaudiocf/pdaudiocf.c
... ... @@ -119,8 +119,10 @@
119 119 }
120 120  
121 121 pdacf = snd_pdacf_create(card);
122   - if (! pdacf)
  122 + if (!pdacf) {
  123 + snd_card_free(card);
123 124 return -EIO;
  125 + }
124 126  
125 127 if (snd_device_new(card, SNDRV_DEV_LOWLEVEL, pdacf, &ops) < 0) {
126 128 kfree(pdacf);