linux/drivers/media/video/em28xx
Jesper Juhl 1207cf84f2 USB: Fix a memory leak in em28xx_usb_probe()
If, in em28xx_usb_probe() the memory allocation
	dev->alt_max_pkt_size = kmalloc(32*
						dev->num_alt,GFP_KERNEL);
fails, then we'll bail out and return -ENOMEM.
The problem is that in that case we don't free the storage allocated
to 'dev', thus causing a memory leak.

This patch fixes the leak by freeing 'dev' before we return -ENOMEM.
This fixes Coverity bug #647.


Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-08-22 14:27:47 -07:00
..
Kconfig V4L/DVB (5640): Fix: em28xx shouldn't be selecting VIDEO_BUF 2007-05-22 16:00:12 -03:00
Makefile kbuild: fix unneeded rebuilds in drivers/media/video after moving source tree 2006-04-04 16:50:50 +02:00
em28xx-cards.c PCI: Cleanup the includes of <linux/pci.h> 2007-05-02 19:02:35 -07:00
em28xx-core.c IRQ: Maintain regs pointer globally rather than passing to IRQ handlers 2006-10-05 15:10:12 +01:00
em28xx-i2c.c Fix misspellings collected by members of KJ list. 2007-05-09 07:14:03 +02:00
em28xx-input.c [PATCH] remove many unneeded #includes of sched.h 2007-02-14 08:09:54 -08:00
em28xx-video.c USB: Fix a memory leak in em28xx_usb_probe() 2007-08-22 14:27:47 -07:00
em28xx.h V4L/DVB (3963): Em28xx/: possible cleanups 2006-06-25 01:59:53 -03:00