From 28330dcc94152433c4bbc3d4d7a26755d4211874 Mon Sep 17 00:00:00 2001 From: Won Chung Date: Mon, 9 May 2022 17:31:35 +0000 Subject: driver core: location: Free struct acpi_pld_info *pld After struct acpi_pld_info *pld is used to fill in physical location values, it should be freed to prevent memleak. Suggested-by: Yu Watanabe Signed-off-by: Won Chung Link: https://lore.kernel.org/r/20220509173135.3515126-1-wonchung@google.com Signed-off-by: Greg Kroah-Hartman --- drivers/base/physical_location.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/base') diff --git a/drivers/base/physical_location.c b/drivers/base/physical_location.c index fbd9f9839e92..617ada542b00 100644 --- a/drivers/base/physical_location.c +++ b/drivers/base/physical_location.c @@ -32,6 +32,7 @@ bool dev_add_physical_location(struct device *dev) dev->physical_location->dock = pld->dock; dev->physical_location->lid = pld->lid; + ACPI_FREE(pld); return true; } -- cgit v1.2.3-70-g09d2