Commit 85a720f
HID: wacom: fix kobject reference count leak
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: 83e6b40 ("HID: wacom: EKR: have the wacom resources dynamically allocated")
Acked-by: Ping Cheng <[email protected]>
Cc: [email protected]
Signed-off-by: Qasim Ijaz <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>1 parent 1a19ae4 commit 85a720f
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2059 | 2059 | | |
2060 | 2060 | | |
2061 | 2061 | | |
| 2062 | + | |
2062 | 2063 | | |
2063 | 2064 | | |
2064 | 2065 | | |
| |||
0 commit comments