kernel-ark/drivers/media
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
..
common V4L/DVB (5859): use msecs_to_jiffies on InfraRed RC5 timeout 2007-07-20 17:35:49 -03:00
dvb V4L/DVB (5991): dvb-pll: Set minimum and maximum frequency properly 2007-08-20 12:18:03 -03:00
radio V4L/DVB (5877): radio-gemtek-pci: remove unused structure member 2007-07-20 17:35:56 -03:00
video USB: Fix a memory leak in em28xx_usb_probe() 2007-08-22 14:27:47 -07:00
Kconfig V4L/DVB (5791): Fix Kbuild for kbd-ir-i2c 2007-07-18 14:24:22 -03:00
Makefile V4L/DVB (5599): Use menuconfig objects II - DVB 2007-05-09 10:12:48 -03:00