USB: usblcd, fix memory leak
PATCH 1/1 USB: usblcd, fix memory leak
Stanse found a memory leak in lcd_probe. Instead of returning without releasing the memory, jump to the error label which frees it.
Signed-off-by Jiri Slaby <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
--- drivers/usb/misc/usblcd.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/usb/misc/usblcd.c +2 -1
@@ -313,7 +313,8 @@ static int lcd_probe(struct usb_interface *interface, const struct usb_device_idif (le16_to_cpu (dev->udev->descriptor.idProduct) !=0x0001 ) {dev_warn (&interface->dev,"USBLCD model not supported.\n" ); -return -ENODEV ; + retval = -ENODEV ; + goto error; }/* set up the endpoint information */
Signature · 1 line
1.6.4.2
Quoted 7 lines · Jiri Slaby
Stanse found a memory leak in
lcd_probe. Instead of returning without releasing the memory, jump to the error label which frees it.Signed-off-by Jiri Slaby <[email protected]>Cc Greg Kroah-Hartman <[email protected]>
Sorry for the delay, just now picked up your original patch.
thanks,
greg "my inbox sucks" k-h