Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 696a4ace authored by Jiri Slaby's avatar Jiri Slaby Committed by Greg Kroah-Hartman
Browse files

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.

http://stanse.fi.muni.cz/



Signed-off-by: default avatarJiri Slaby <jirislaby@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 0f0ba794
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -313,7 +313,8 @@ static int lcd_probe(struct usb_interface *interface, const struct usb_device_id

	if (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 */