Gitweb: http://git.kernel.org/linus/a0624a90a2bea97e0d65187b4b53ad400226c3f1 Commit: a0624a90a2bea97e0d65187b4b53ad400226c3f1 Parent: 3d7b165539d4174b0b8396bd52ee37ba21bd0dfb Author: Yong Wang <yong.y.wang@linux.intel.com> AuthorDate: Mon Apr 5 21:09:40 2010 +0800 Committer: Matthew Garrett <mjg@redhat.com> CommitDate: Mon Apr 12 13:10:19 2010 -0400 dell-wmi: Fix memory leak The output of wmi_get_event_data shall be freed before return. Signed-off-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Yong Wang <yong.y.wang@linux.intel.com> --- drivers/platform/x86/dell-wmi.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/platform/x86/dell-wmi.c b/drivers/platform/x86/dell-wmi.c index 6ba6c30..66f53c3 100644 --- a/drivers/platform/x86/dell-wmi.c +++ b/drivers/platform/x86/dell-wmi.c @@ -217,6 +217,7 @@ static void dell_wmi_notify(u32 value, void *context) if (dell_new_hk_type && (buffer_entry[1] != 0x10)) { printk(KERN_INFO "dell-wmi: Received unknown WMI event" " (0x%x)\n", buffer_entry[1]); + kfree(obj); return; } @@ -234,7 +235,7 @@ static void dell_wmi_notify(u32 value, void *context) key->keycode == KEY_BRIGHTNESSDOWN) && acpi_video) { /* Don't report brightness notifications that will also * come via ACPI */ - return; + ; } else { input_report_key(dell_wmi_input_dev, key->keycode, 1); input_sync(dell_wmi_input_dev); -- To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
