diff options
author | Jesper Juhl <jesper.juhl@gmail.com> | 2007-08-06 08:05:27 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2007-10-16 09:58:25 -0400 |
commit | 6ed44ad3ebec52059f6f534deeb08f1d701852c5 (patch) | |
tree | 902acd208a7dafb6028b3aa0abc79f7e038861f9 | |
parent | 12f288bffeaa3196ebd5da49c5c7ac06c6188b61 (diff) |
[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>
-rw-r--r-- | sound/pci/au88x0/au88x0.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/pci/au88x0/au88x0.c b/sound/pci/au88x0/au88x0.c index 5ec1b6fcd548..f70286a7364a 100644 --- a/sound/pci/au88x0/au88x0.c +++ b/sound/pci/au88x0/au88x0.c | |||
@@ -232,6 +232,7 @@ snd_vortex_create(struct snd_card *card, struct pci_dev *pci, vortex_t ** rchip) | |||
232 | pci_disable_device(chip->pci_dev); | 232 | pci_disable_device(chip->pci_dev); |
233 | //FIXME: this not the right place to unregister the gameport | 233 | //FIXME: this not the right place to unregister the gameport |
234 | vortex_gameport_unregister(chip); | 234 | vortex_gameport_unregister(chip); |
235 | kfree(chip); | ||
235 | return err; | 236 | return err; |
236 | } | 237 | } |
237 | 238 | ||