]> git.baikalelectronics.ru Git - kernel.git/commit
ACPI: bus: Call kobject_put() in acpi_init() error path
authorHanjun Guo <guohanjun@huawei.com>
Wed, 2 Jun 2021 09:36:50 +0000 (17:36 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Jul 2021 14:53:17 +0000 (16:53 +0200)
commit692c175701bdc28a99362edf30ab8b27238b544a
tree72ca7301f259dc5dba709cb426eba0aa92b4ba6d
parent5f14537646276e486e457691257707df2e691022
ACPI: bus: Call kobject_put() in acpi_init() error path

[ Upstream commit 4ac7a817f1992103d4e68e9837304f860b5e7300 ]

Although the system will not be in a good condition or it will not
boot if acpi_bus_init() fails, it is still necessary to put the
kobject in the error path before returning to avoid leaking memory.

Signed-off-by: Hanjun Guo <guohanjun@huawei.com>
[ rjw: Subject and changelog edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/acpi/bus.c