projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d0f1d5a
)
HID: thrustmaster: Fix memory leak in remove
author
Evgeny Novikov
<novikov@ispras.ru>
Fri, 30 Jul 2021 16:51:09 +0000
(19:51 +0300)
committer
Jiri Kosina
<jkosina@suse.cz>
Fri, 20 Aug 2021 12:24:57 +0000
(14:24 +0200)
thrustmaster_remove() does not release memory for
tm_wheel->change_request. This is fixed by the patch.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Evgeny Novikov <novikov@ispras.ru>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-thrustmaster.c
patch
|
blob
|
history
diff --git
a/drivers/hid/hid-thrustmaster.c
b/drivers/hid/hid-thrustmaster.c
index
e94d340
..
9cb4248
100644
(file)
--- a/
drivers/hid/hid-thrustmaster.c
+++ b/
drivers/hid/hid-thrustmaster.c
@@
-253,6
+253,7
@@
static void thrustmaster_remove(struct hid_device *hdev)
usb_kill_urb(tm_wheel->urb);
+ kfree(tm_wheel->change_request);
kfree(tm_wheel->response);
kfree(tm_wheel->model_request);
usb_free_urb(tm_wheel->urb);