浏览代码

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>
Li Dongyang 13 年之前
父节点
当前提交
d2be15bdda
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      drivers/platform/x86/thinkpad_acpi.c

+ 1 - 0
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);
 }