summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorJohan Hovold <jhovold@gmail.com>2012-10-25 12:29:07 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-10-25 20:36:58 +0400
commitb8a0055050b6294826171641b182c09f78f4cc63 (patch)
tree7e8295c13575775422fa60a47d8406159d40537c /drivers/usb
parentfeffa7ca6008ab859dd7ab7448a5a899bf0aa98f (diff)
downloadlinux-b8a0055050b6294826171641b182c09f78f4cc63.tar.xz
USB: quatech2: fix memory leak in error path
Fix memory leak in attach error path where the read urb was never freed. Cc: Bill Pemberton <wfp5p@virginia.edu> Cc: <stable@vger.kernel.org> Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/serial/quatech2.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/serial/quatech2.c b/drivers/usb/serial/quatech2.c
index 2cdfdcc90b37..5adb7428fbb1 100644
--- a/drivers/usb/serial/quatech2.c
+++ b/drivers/usb/serial/quatech2.c
@@ -823,6 +823,7 @@ static int qt2_setup_urbs(struct usb_serial *serial)
if (status != 0) {
dev_err(&serial->dev->dev,
"%s - submit read urb failed %i\n", __func__, status);
+ usb_free_urb(serial_priv->read_urb);
return status;
}