mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 11:50:43 +09:00
USB: mos7840: fix port-device leak in error path
commit 3eb55cc4ed upstream.
The driver set the usb-serial port pointers to NULL on errors in attach,
effectively preventing usb-serial core from decrementing the port ref
counters and releasing the port devices and associated data.
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
de3ca50ea7
commit
52fb227a7b
@@ -2595,7 +2595,6 @@ error:
|
||||
kfree(mos7840_port->ctrl_buf);
|
||||
usb_free_urb(mos7840_port->control_urb);
|
||||
kfree(mos7840_port);
|
||||
serial->port[i] = NULL;
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user