From: Won Chung <wonchung@google.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Yu Watanabe <watanabe.yu@gmail.com>,
linux-kernel@vger.kernel.org
Cc: "Rafael J . Wysocki" <rafael@kernel.org>,
Won Chung <wonchung@google.com>
Subject: [PATCH] driver core: location: Free struct acpi_pld_info *pld
Date: Mon, 9 May 2022 17:31:35 +0000 [thread overview]
Message-ID: <20220509173135.3515126-1-wonchung@google.com> (raw)
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>
---
drivers/base/physical_location.c | 1 +
1 file changed, 1 insertion(+)
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;
}
--
2.36.0.512.ge40c2bad7a-goog
next reply other threads:[~2022-05-09 17:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-09 17:31 Won Chung [this message]
2022-05-19 16:51 ` [PATCH] driver core: location: Free struct acpi_pld_info *pld Greg Kroah-Hartman
2022-05-19 16:51 ` Greg Kroah-Hartman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220509173135.3515126-1-wonchung@google.com \
--to=wonchung@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=watanabe.yu@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox