mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-08 05:34:29 +08:00
[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: 66e89522af
("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: Johan Hovold <johan@kernel.org>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
This commit is contained in:
parent
4e66a52a2e
commit
2d5a6ce71c
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user