dect
/
linux-2.6
Archived
13
0
Fork 0

[ALSA] au88x0: mem leak fix in snd_vortex_create()

In sound/pci/au88x0/au88x0.c::snd_vortex_create() :
The Coverity checker found that if we allocate storage for 'chip'
but then leave via the  regions_out:  label, then we end up leaking
the storage allocated for 'chip'.
I believe simply freeing 'chip' before the 'return err;' line is
all we need to fix this, but please double-check me :)

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
This commit is contained in:
Jesper Juhl 2007-08-06 14:05:27 +02:00 committed by Jaroslav Kysela
parent 12f288bffe
commit 6ed44ad3eb
1 changed files with 1 additions and 0 deletions

View File

@ -232,6 +232,7 @@ snd_vortex_create(struct snd_card *card, struct pci_dev *pci, vortex_t ** rchip)
pci_disable_device(chip->pci_dev);
//FIXME: this not the right place to unregister the gameport
vortex_gameport_unregister(chip);
kfree(chip);
return err;
}