ACPI: configfs: Add missing config_item_put() to fix refcount leak

config_item_put() should be called in the drop_item callback, to
decrement refcount for the config item.

Fixes: 772bf1e287 ("ACPI: configfs: Unload SSDT on configfs entry removal")
Signed-off-by: Hanjun Guo <guohanjun@huawei.com>
[ rjw: Subject edit ]
Cc: 4.13+ <stable@vger.kernel.org> # 4.13+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
Hanjun Guo 2020-09-18 17:13:28 +08:00 committed by Rafael J. Wysocki
parent ba4f184e12
commit 9a2e849fb6

View File

@ -228,6 +228,7 @@ static void acpi_table_drop_item(struct config_group *group,
ACPI_INFO(("Host-directed Dynamic ACPI Table Unload"));
acpi_unload_table(table->index);
config_item_put(cfg);
}
static struct configfs_group_operations acpi_table_group_ops = {