Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 57b0ad4f authored by Qasim Ijaz's avatar Qasim Ijaz Committed by Greg Kroah-Hartman
Browse files

HID: wacom: fix kobject reference count leak



commit 85a720f4337f0ddf1603c8b75a8f1ffbbe022ef9 upstream.

When sysfs_create_files() fails in wacom_initialize_remotes() the error
is returned and the cleanup action will not have been registered yet.

As a result the kobject???s refcount is never dropped, so the
kobject can never be freed leading to a reference leak.

Fix this by calling kobject_put() before returning.

Fixes: 83e6b40e ("HID: wacom: EKR: have the wacom resources dynamically allocated")
Acked-by: default avatarPing Cheng <ping.cheng@wacom.com>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarQasim Ijaz <qasdev00@gmail.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ee49c0e9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment