From: Parag Warudkar Date: Tue, 12 Aug 2008 22:08:46 +0000 (-0700) Subject: isight_firmware: fix a leak and double kfree() X-Git-Tag: v2.6.27-rc3~33 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=ff1a4a7b14ae146142b1c93a001304caf662ae13;p=linux-2.6-omap-h63xx.git isight_firmware: fix a leak and double kfree() Signed-off-by: Parag Warudkar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/usb/misc/isight_firmware.c b/drivers/usb/misc/isight_firmware.c index d94aa738760..b897f6554ec 100644 --- a/drivers/usb/misc/isight_firmware.c +++ b/drivers/usb/misc/isight_firmware.c @@ -48,7 +48,8 @@ static int isight_firmware_load(struct usb_interface *intf, if (request_firmware(&firmware, "isight.fw", &dev->dev) != 0) { printk(KERN_ERR "Unable to load isight firmware\n"); - return -ENODEV; + ret = -ENODEV; + goto out; } ptr = firmware->data; @@ -91,7 +92,6 @@ static int isight_firmware_load(struct usb_interface *intf, buf, llen, 300) != llen) { printk(KERN_ERR "Failed to load isight firmware\n"); - kfree(buf); ret = -ENODEV; goto out; }