Skip to content

Commit

Permalink
USB: quatech2: fix memory leak in error path
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Johan Hovold authored and Greg Kroah-Hartman committed Oct 25, 2012
1 parent feffa7c commit b8a0055
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/usb/serial/quatech2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit b8a0055

Please sign in to comment.