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:
33e423c
)
[media] dibusb: fix possible memory leak in dibusb_rc_query()
author
Wei Yongjun
<
[email protected]
>
Sun, 30 Oct 2016 01:36:24 +0000
(23:36 -0200)
committer
Mauro Carvalho Chehab
<
[email protected]
>
Mon, 21 Nov 2016 13:40:45 +0000
(11:40 -0200)
'buf' is malloced in dibusb_rc_query() and should be freed before
leaving from the error handling cases, otherwise it will cause
memory leak.
Fixes: ff1c123545d7 ("[media] dibusb: handle error code on RC query")
Signed-off-by: Wei Yongjun <
[email protected]
>
Signed-off-by: Mauro Carvalho Chehab <
[email protected]
>
drivers/media/usb/dvb-usb/dibusb-common.c
patch
|
blob
|
history
diff --git
a/drivers/media/usb/dvb-usb/dibusb-common.c
b/drivers/media/usb/dvb-usb/dibusb-common.c
index de3ee2547479428cd1c14347db5332ea1090c60d..8207e6900656bef61de4f0df10b37b5cc6110f98 100644
(file)
--- a/
drivers/media/usb/dvb-usb/dibusb-common.c
+++ b/
drivers/media/usb/dvb-usb/dibusb-common.c
@@
-382,9
+382,9
@@
int dibusb_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
if (buf[0] != 0)
deb_info("key: %*ph\n", 5, buf);
+ret:
kfree(buf);
-ret:
return ret;
}
EXPORT_SYMBOL(dibusb_rc_query);