]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
USB: mos7840: fix urb leak at release
authorJohan Hovold <jhovold@gmail.com>
Thu, 25 Oct 2012 11:35:09 +0000 (13:35 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Tue, 30 Oct 2012 23:27:03 +0000 (23:27 +0000)
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>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/usb/serial/mos7840.c

index b150ed914a702f119a0a912b7fe15506ce0f1a5c..e0667a955b9f733db5bc80494be724e023e0bfc8 100644 (file)
@@ -2661,6 +2661,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);