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

Commit bdce4933 authored by Qiushi Wu's avatar Qiushi Wu Committed by Greg Kroah-Hartman
Browse files

ACPI: sysfs: Fix reference count leak in acpi_sysfs_add_hotplug_profile()



commit 6e6c25283dff866308c87b49434c7dbad4774cc0 upstream.

kobject_init_and_add() takes reference even when it fails.
Thus, when kobject_init_and_add() returns an error,
kobject_put() must be called to properly clean up the kobject.

Fixes: 3f8055c3 ("ACPI / hotplug: Introduce user space interface for hotplug profiles")
Signed-off-by: default avatarQiushi Wu <wu000273@umn.edu>
Cc: 3.10+ <stable@vger.kernel.org> # 3.10+
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f4df2c5f
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