Commit 9f835c30 authored by Anisse Astier's avatar Anisse Astier Committed by Greg Kroah-Hartman

wmi: Free the allocated acpi objects through wmi_get_event_data

commit 3e9b988e upstream

[ backported to 2.6.32 ]

These function allocate an acpi object by calling wmi_get_event_data, which
then calls acpi_evaluate_object, and it is not freed afterwards.

And kernel doc is fixed for parameters of wmi_get_event_data.
Signed-off-by: default avatarAnisse Astier <anisse@astier.eu>
Acked-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
Acked-by: default avatarCarlos Corbacho <carlos@strangeworlds.co.uk>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
Cc: Chuck Ebbert <cebbert@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent fa56c7ea
......@@ -180,6 +180,7 @@ static void dell_wmi_notify(u32 value, void *context)
printk(KERN_INFO "dell-wmi: Unknown key %x pressed\n",
buffer[1] & 0xFFFF);
}
kfree(obj);
}
static int __init dell_wmi_input_setup(void)
......
......@@ -377,6 +377,8 @@ static void hp_wmi_notify(u32 value, void *context)
eventcode);
} else
printk(KERN_INFO "HP WMI: Unknown response received\n");
kfree(obj);
}
static int __init hp_wmi_input_setup(void)
......
......@@ -510,8 +510,8 @@ EXPORT_SYMBOL_GPL(wmi_remove_notify_handler);
/**
* wmi_get_event_data - Get WMI data associated with an event
*
* @event - Event to find
* &out - Buffer to hold event data
* @event: Event to find
* @out: Buffer to hold event data. out->pointer should be freed with kfree()
*
* Returns extra data associated with an event in WMI.
*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment