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:
29aa98d
)
HID: sony: Fix a potential memory leak in sony_probe()
author
Christophe JAILLET
<christophe.jaillet@wanadoo.fr>
Sun, 3 Sep 2023 16:04:00 +0000
(18:04 +0200)
committer
Jiri Kosina
<jkosina@suse.cz>
Mon, 4 Sep 2023 09:14:22 +0000
(11:14 +0200)
If an error occurs after a successful usb_alloc_urb() call, usb_free_urb()
should be called.
Fixes:
fb1a79a6b6e1
("HID: sony: fix freeze when inserting ghlive ps3/wii dongles")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-sony.c
patch
|
blob
|
history
diff --git
a/drivers/hid/hid-sony.c
b/drivers/hid/hid-sony.c
index
dd94206
..
a02046a
100644
(file)
--- a/
drivers/hid/hid-sony.c
+++ b/
drivers/hid/hid-sony.c
@@
-2155,6
+2155,9
@@
static int sony_probe(struct hid_device *hdev, const struct hid_device_id *id)
return ret;
err:
+ if (sc->ghl_urb)
+ usb_free_urb(sc->ghl_urb);
+
hid_hw_stop(hdev);
return ret;
}