diff options
author | Oliver Neukum <oliver@neukum.org> | 2007-03-26 12:12:44 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-04-27 16:28:38 -0400 |
commit | 4edf2c83637b9e9db771cc5629de036fe4488564 (patch) | |
tree | db29cd92d40a29c86d69881416d3f33eea498ab4 /drivers/usb/serial/ark3116.c | |
parent | 868e440d2f2b55f790d106100a46034b6aa12577 (diff) |
USB: fix ark3116 memory leak
this driver has a memory leak in an error case.
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial/ark3116.c')
-rw-r--r-- | drivers/usb/serial/ark3116.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/serial/ark3116.c b/drivers/usb/serial/ark3116.c index edd685791a6b..ea2175bb2274 100644 --- a/drivers/usb/serial/ark3116.c +++ b/drivers/usb/serial/ark3116.c | |||
@@ -341,7 +341,7 @@ static int ark3116_open(struct usb_serial_port *port, struct file *filp) | |||
341 | 341 | ||
342 | result = usb_serial_generic_open(port, filp); | 342 | result = usb_serial_generic_open(port, filp); |
343 | if (result) | 343 | if (result) |
344 | return result; | 344 | goto err_out; |
345 | 345 | ||
346 | /* open */ | 346 | /* open */ |
347 | ARK3116_RCV(serial, 111, 0xFE, 0xC0, 0x0000, 0x0003, 0x02, buf); | 347 | 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 | if (port->tty) | 372 | if (port->tty) |
373 | ark3116_set_termios(port, &tmp_termios); | 373 | ark3116_set_termios(port, &tmp_termios); |
374 | 374 | ||
375 | err_out: | ||
375 | kfree(buf); | 376 | kfree(buf); |
376 | 377 | ||
377 | return result; | 378 | return result; |