Skip to content
Commit 817b8b9c authored by Dongliang Mu's avatar Dongliang Mu Committed by Jiri Kosina
Browse files

HID: elo: fix memory leak in elo_probe

When hid_parse() in elo_probe() fails, it forgets to call usb_put_dev to
decrease the refcount.

Fix this by adding usb_put_dev() in the error handling code of elo_probe().

Fixes: fbf42729

 ("HID: elo: update the reference count of the usb device structure")
Reported-by: default avatarsyzkaller <syzkaller@googlegroups.com>
Signed-off-by: default avatarDongliang Mu <mudongliangabcd@gmail.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent e26a7805
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment