projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9920184
)
uwb: hwa-rc: fix memory leak at probe
author
Anton Vasilyev
<vasilyev@ispras.ru>
Fri, 6 Jul 2018 12:32:53 +0000
(15:32 +0300)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Fri, 6 Jul 2018 14:36:19 +0000
(16:36 +0200)
hwarc_probe() allocates memory for hwarc, but does not free it
if uwb_rc_add() or hwarc_get_version() fail.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Anton Vasilyev <vasilyev@ispras.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/uwb/hwa-rc.c
patch
|
blob
|
history
diff --git
a/drivers/uwb/hwa-rc.c
b/drivers/uwb/hwa-rc.c
index 9a53912bdfe9f73d4b7de6a1d3b74dd8a94dc8b6..5d3ba747ae17a8882a959ff7be59309eecf11c36 100644
(file)
--- a/
drivers/uwb/hwa-rc.c
+++ b/
drivers/uwb/hwa-rc.c
@@
-873,6
+873,7
@@
error_get_version:
error_rc_add:
usb_put_intf(iface);
usb_put_dev(hwarc->usb_dev);
+ kfree(hwarc);
error_alloc:
uwb_rc_put(uwb_rc);
error_rc_alloc: