dell-wmi: fix a memory leak
authorAxel Lin <axel.lin@gmail.com>
Wed, 30 Jun 2010 09:25:46 +0000 (17:25 +0800)
committerMatthew Garrett <mjg@redhat.com>
Tue, 3 Aug 2010 13:48:53 +0000 (09:48 -0400)
If dell_new_hk_type is true, dell_legacy_wmi_keymap will point to a memory
allocated in setup_new_hk_map().
In this case, the memory is not freed in current implementation.
This patch fixes the leak by kfree(dell_wmi_keymap) if dell_new_hk_type is true.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>

No differences found