summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLi Dongyang <jerry87905@gmail.com>2012-07-25 10:45:08 +1000
committerMatthew Garrett <mjg@redhat.com>2012-07-28 00:28:56 -0400
commitd2be15bdda45b184d483754e434c9a1c8ed80a8e (patch)
tree1dfd7e5474bac94f2210da92c6c3e2c27e81614a /drivers
parente03e389da50dd967f20470e58827abe7a532c5a5 (diff)
downloadlinux-d2be15bdda45b184d483754e434c9a1c8ed80a8e.tar.gz
linux-d2be15bdda45b184d483754e434c9a1c8ed80a8e.tar.bz2
linux-d2be15bdda45b184d483754e434c9a1c8ed80a8e.zip
thinkpad_acpi: Fix a memory leak during module exit
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> Signed-off-by: Matthew Garrett <mjg@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/platform/x86/thinkpad_acpi.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index c85b66602ee1..ae203558ac90 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);
}