diff options
author | Won Chung <wonchung@google.com> | 2022-05-09 17:31:35 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-05-19 19:28:30 +0200 |
commit | 28330dcc94152433c4bbc3d4d7a26755d4211874 (patch) | |
tree | 8e66d23e7aebf74972131847390e81dcc552360c /drivers/base | |
parent | f79f662e4cd56f6fd3436dd68057d2ec1f7d2025 (diff) |
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 <watanabe.yu@gmail.com>
Signed-off-by: Won Chung <wonchung@google.com>
Link: https://lore.kernel.org/r/20220509173135.3515126-1-wonchung@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/physical_location.c | 1 |
1 files changed, 1 insertions, 0 deletions
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; } |