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>
This commit is contained in:
parent
feffa7ca60
commit
b8a0055050
|
@ -823,6 +823,7 @@ static int qt2_setup_urbs(struct usb_serial *serial)
|
||||||
if (status != 0) {
|
if (status != 0) {
|
||||||
dev_err(&serial->dev->dev,
|
dev_err(&serial->dev->dev,
|
||||||
"%s - submit read urb failed %i\n", __func__, status);
|
"%s - submit read urb failed %i\n", __func__, status);
|
||||||
|
usb_free_urb(serial_priv->read_urb);
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in New Issue