提交 2d5a6ce7 编写于 作者: J Johan Hovold 提交者: 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: NJohan Hovold <johan@kernel.org>
Signed-off-by: NSean Young <sean@mess.org>
Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册