Commit 2d5a6ce7 authored by Johan Hovold's avatar Johan Hovold Committed by Mauro Carvalho Chehab

[media] mceusb: fix memory leaks in error path

Fix urb and transfer-buffer leaks in an urb-submission error path which
may be hit when a device is disconnected.

Fixes: 66e89522 ("V4L/DVB: IR: add mceusb IR receiver driver")

Cc: stable <stable@vger.kernel.org>     # 2.6.36
Cc: Jarod Wilson <jarod@redhat.com>
Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
Signed-off-by: default avatarSean Young <sean@mess.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 4e66a52a
......@@ -795,6 +795,8 @@ static void mce_request_packet(struct mceusb_dev *ir, unsigned char *data,
res = usb_submit_urb(async_urb, GFP_ATOMIC);
if (res) {
dev_err(dev, "send request FAILED! (res=%d)", res);
kfree(async_buf);
usb_free_urb(async_urb);
return;
}
dev_dbg(dev, "send request complete (res=%d)", res);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment