driver core: location: Free struct acpi_pld_info *pld
PATCH 1/1 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 <[email protected]>
Signed-off-by Won Chung <[email protected]>
--- drivers/base/physical_location.c | 1 + 1 file changed, 1 insertion(+)
drivers/base/physical_location.c +1 -0
@@ -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; }
Signature · 1 line
2.36.0.512.ge40c2bad7a-goog
Greg Kroah-Hartman
maintainerQuoted 24 lines · Won Chung
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 <[email protected]>Signed-off-by Won Chung <[email protected]>--- drivers/base/physical_location.c | 1 + 1 file changed, 1 insertion(+)drivers/base/physical_location.c +1
-0@@ -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; }Signature · 1 line
2.36.0.512.ge40c2bad7a-goog
What commit id does this fix? Please add that and resend.
thanks,
greg k-h
Greg Kroah-Hartman
maintainerQuoted 22 lines · Greg Kroah-Hartman
Quoted 21 lines · Won Chung
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 <[email protected]>Signed-off-by Won Chung <[email protected]>--- drivers/base/physical_location.c | 1 + 1 file changed, 1 insertion(+)drivers/base/physical_location.c +1
-0@@ -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; }
Quoted 8 lines
Quoted 3 lines
Signature · 1 line
2.36.0.512.ge40c2bad7a-googWhat commit id does this fix? Please add that and resend.
thanks,
greg k-h
Nevermind, I'll take it as-is.