git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
USB: serial: mos7720: fix use-after-free on probe errors
[pandora-kernel.git]
/
drivers
/
usb
/
serial
/
mos7720.c
diff --git
a/drivers/usb/serial/mos7720.c
b/drivers/usb/serial/mos7720.c
index
a524ea1
..
eadeee5
100644
(file)
--- a/
drivers/usb/serial/mos7720.c
+++ b/
drivers/usb/serial/mos7720.c
@@
-2147,8
+2147,10
@@
static int mos7720_startup(struct usb_serial *serial)
#ifdef CONFIG_USB_SERIAL_MOS7715_PARPORT
if (product == MOSCHIP_DEVICE_ID_7715) {
ret_val = mos7715_parport_init(serial);
#ifdef CONFIG_USB_SERIAL_MOS7715_PARPORT
if (product == MOSCHIP_DEVICE_ID_7715) {
ret_val = mos7715_parport_init(serial);
- if (ret_val < 0)
+ if (ret_val < 0) {
+ usb_kill_urb(serial->port[0]->interrupt_in_urb);
return ret_val;
return ret_val;
+ }
}
#endif
/* LSR For Port 1 */
}
#endif
/* LSR For Port 1 */
@@
-2162,6
+2164,8
@@
static void mos7720_release(struct usb_serial *serial)
{
int i;
{
int i;
+ usb_kill_urb(serial->port[0]->interrupt_in_urb);
+
#ifdef CONFIG_USB_SERIAL_MOS7715_PARPORT
/* close the parallel port */
#ifdef CONFIG_USB_SERIAL_MOS7715_PARPORT
/* close the parallel port */