From: Li Dongyang <jerry87905@gmail.com>
To: platform-driver-x86@vger.kernel.org
Cc: ibm-acpi@hmh.eng.br, mjg@redhat.com
Subject: [PATCH 2/3] thinkpad_acpi: Fix a memory leak during module exit
Date: Wed, 25 Jul 2012 10:45:08 +1000 [thread overview]
Message-ID: <1343177109-1664-2-git-send-email-Jerry87905@gmail.com> (raw)
In-Reply-To: <1343177109-1664-1-git-send-email-Jerry87905@gmail.com>
We should free the thinkpad_id.nummodel_str during exit as it's allocated
in get_thinkpad_module_data().
Signed-off-by: Li Dongyang <Jerry87905@gmail.com>
---
drivers/platform/x86/thinkpad_acpi.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index c85b666..ae20355 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -8970,6 +8970,7 @@ static void thinkpad_acpi_module_exit(void)
kfree(thinkpad_id.bios_version_str);
kfree(thinkpad_id.ec_version_str);
kfree(thinkpad_id.model_str);
+ kfree(thinkpad_id.nummodel_str);
}
--
1.7.11.3
next prev parent reply other threads:[~2012-07-25 0:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-25 0:45 [PATCH 1/3] thinkpad_acpi: Flush the workqueue before freeing tpacpi_leds Li Dongyang
2012-07-25 0:45 ` Li Dongyang [this message]
2012-07-25 0:45 ` [PATCH 3/3] thinkpad_acpi: Free hotkey_keycode_map after unregistering tpacpi_inputdev Li Dongyang
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=1343177109-1664-2-git-send-email-Jerry87905@gmail.com \
--to=jerry87905@gmail.com \
--cc=ibm-acpi@hmh.eng.br \
--cc=mjg@redhat.com \
--cc=platform-driver-x86@vger.kernel.org \
/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