projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4e66a52
)
[media] mceusb: fix memory leaks in error path
author
Johan Hovold
<
[email protected]
>
Thu, 1 Jun 2017 07:45:59 +0000
(
04:45
-0300)
committer
Mauro Carvalho Chehab
<
[email protected]
>
Wed, 7 Jun 2017 12:39:19 +0000
(09:39 -0300)
Fix urb and transfer-buffer leaks in an urb-submission error path which
may be hit when a device is disconnected.
Fixes: 66e89522aff7 ("V4L/DVB: IR: add mceusb IR receiver driver")
Cc: stable <
[email protected]
> # 2.6.36
Cc: Jarod Wilson <
[email protected]
>
Signed-off-by: Johan Hovold <
[email protected]
>
Signed-off-by: Sean Young <
[email protected]
>
Signed-off-by: Mauro Carvalho Chehab <
[email protected]
>
drivers/media/rc/mceusb.c
patch
|
blob
|
history
diff --git
a/drivers/media/rc/mceusb.c
b/drivers/media/rc/mceusb.c
index 4530237cbb672a2182fd2a6b21393ade107d2f92..04d6cd1818fb0ef53aeeb25359971836eca50917 100644
(file)
--- a/
drivers/media/rc/mceusb.c
+++ b/
drivers/media/rc/mceusb.c
@@
-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);