Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

[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
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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);