Skip to content

Commit

Permalink
[media] mceusb: fix memory leaks in error path
Browse files Browse the repository at this point in the history
Fix urb and transfer-buffer leaks in an urb-submission error path which
may be hit when a device is disconnected.

Fixes: 66e8952 ("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>
  • Loading branch information
Johan Hovold authored and Mauro Carvalho Chehab committed Jun 7, 2017
1 parent 4e66a52 commit 2d5a6ce
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/media/rc/mceusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 2d5a6ce

Please sign in to comment.