projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f79f662
)
driver core: location: Free struct acpi_pld_info *pld
author
Won Chung
<wonchung@google.com>
Mon, 9 May 2022 17:31:35 +0000
(17:31 +0000)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Thu, 19 May 2022 17:28:30 +0000
(19:28 +0200)
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>
drivers/base/physical_location.c
patch
|
blob
|
history
diff --git
a/drivers/base/physical_location.c
b/drivers/base/physical_location.c
index
fbd9f98
..
617ada5
100644
(file)
--- 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;
}