summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohan Hovold <jhovold@gmail.com>2012-10-25 13:35:09 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-10-31 09:51:36 -0700
commitde3ca50ea7524819a881d841e73ffb0c2aed73f7 (patch)
tree4fe9a1e985378b74de1d96b6faafe92d2b105c4a
parent25a665eeaba137ef1758ee747d0fc8f9b42bc091 (diff)
downloadlinux-stable-de3ca50ea7524819a881d841e73ffb0c2aed73f7.tar.gz
linux-stable-de3ca50ea7524819a881d841e73ffb0c2aed73f7.tar.bz2
linux-stable-de3ca50ea7524819a881d841e73ffb0c2aed73f7.zip
USB: mos7840: fix urb leak at release
commit 65a4cdbb170e4ec1a7fa0e94936d47e24a17b0e8 upstream. Make sure control urb is freed at release. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/usb/serial/mos7840.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c
index fd2463e6bd43..d79760c20f51 100644
--- a/drivers/usb/serial/mos7840.c
+++ b/drivers/usb/serial/mos7840.c
@@ -2662,6 +2662,7 @@ static void mos7840_release(struct usb_serial *serial)
mos7840_port = mos7840_get_port_private(serial->port[i]);
dbg("mos7840_port %d = %p", i, mos7840_port);
if (mos7840_port) {
+ usb_free_urb(mos7840_port->control_urb);
kfree(mos7840_port->ctrl_buf);
kfree(mos7840_port->dr);
kfree(mos7840_port);