aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohan Hovold <jhovold@gmail.com>2012-10-25 10:29:07 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-10-31 10:10:16 -0700
commit24496dfe837363e83d9f1dde5bd68372088e6f88 (patch)
tree1c240a1b5aee0c5e0cc50ff4f53ec7b907de7457
parent89133c6f9cf825de28dff95aa4e933d5349b0101 (diff)
downloadlinux-linaro-stable-24496dfe837363e83d9f1dde5bd68372088e6f88.tar.gz
USB: quatech2: fix memory leak in error path
commit b8a0055050b6294826171641b182c09f78f4cc63 upstream. Fix memory leak in attach error path where the read urb was never freed. Signed-off-by: Johan Hovold <jhovold@gmail.com> Cc: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-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 151670b6b72a..2cd5493d611f 100644
--- a/drivers/usb/serial/quatech2.c
+++ b/drivers/usb/serial/quatech2.c
@@ -825,6 +825,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;
}