Skip to content

Commit

Permalink
thinkpad_acpi: Fix a memory leak during module exit
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Li Dongyang authored and Matthew Garrett committed Jul 28, 2012
1 parent e03e389 commit d2be15b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/platform/x86/thinkpad_acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}


Expand Down

0 comments on commit d2be15b

Please sign in to comment.