提交 4edf2c83 编写于 作者: O Oliver Neukum 提交者: Greg Kroah-Hartman

USB: fix ark3116 memory leak

this driver has a memory leak in an error case.
Signed-off-by: NOliver Neukum <oneukum@suse.de>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 868e440d
...@@ -341,7 +341,7 @@ static int ark3116_open(struct usb_serial_port *port, struct file *filp) ...@@ -341,7 +341,7 @@ static int ark3116_open(struct usb_serial_port *port, struct file *filp)
result = usb_serial_generic_open(port, filp); result = usb_serial_generic_open(port, filp);
if (result) if (result)
return result; goto err_out;
/* open */ /* open */
ARK3116_RCV(serial, 111, 0xFE, 0xC0, 0x0000, 0x0003, 0x02, buf); ARK3116_RCV(serial, 111, 0xFE, 0xC0, 0x0000, 0x0003, 0x02, buf);
...@@ -372,6 +372,7 @@ static int ark3116_open(struct usb_serial_port *port, struct file *filp) ...@@ -372,6 +372,7 @@ static int ark3116_open(struct usb_serial_port *port, struct file *filp)
if (port->tty) if (port->tty)
ark3116_set_termios(port, &tmp_termios); ark3116_set_termios(port, &tmp_termios);
err_out:
kfree(buf); kfree(buf);
return result; return result;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册