Skip to content

Commit

Permalink
dell-wmi: Fix memory leak
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Yong Wang authored and Matthew Garrett committed Apr 12, 2010
1 parent 3d7b165 commit a0624a9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/platform/x86/dell-wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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);
Expand Down

0 comments on commit a0624a9

Please sign in to comment.