HID: hyperv: fix possible memory leak in mousevsc_probe()
stable inclusion from stable-v5.10.155 commit 8597b59e3d22b27849bd3e4f92a3d466774bfb04 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I7M5F4 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=8597b59e3d22b27849bd3e4f92a3d466774bfb04 -------------------------------- [ Upstream commit b5bcb94b ] If hid_add_device() returns error, it should call hid_destroy_device() to free hid_dev which is allocated in hid_allocate_device(). Fixes: 74c4fb05 ("HID: hv_mouse: Properly add the hid device") Signed-off-by:Yang Yingliang <yangyingliang@huawei.com> Reviewed-by:
Wei Liu <wei.liu@kernel.org> Signed-off-by:
Jiri Kosina <jkosina@suse.cz> Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
sanglipeng <sanglipeng1@jd.com>
Loading
Please sign in to comment