提交 696a4ace 编写于 作者: J Jiri Slaby 提交者: Greg Kroah-Hartman

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: NJiri Slaby <jirislaby@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 0f0ba794
......@@ -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 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册