diff options
author | Anisse Astier <anisse@astier.eu> | 2009-12-04 04:10:09 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2009-12-24 00:42:00 -0500 |
commit | 3e9b988e4edf065d39c1343937f717319b1c1065 (patch) | |
tree | cbe17a0322f64a3b5ebb8ead6b610cf3cd1f4fb7 /drivers | |
parent | dcbfb8156a2149fd6358a377aa9400e28ef43800 (diff) |
wmi: Free the allocated acpi objects through wmi_get_event_data
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: Anisse Astier <anisse@astier.eu>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/platform/x86/dell-wmi.c | 1 | ||||
-rw-r--r-- | drivers/platform/x86/hp-wmi.c | 2 | ||||
-rw-r--r-- | drivers/platform/x86/wmi.c | 4 |
3 files changed, 5 insertions, 2 deletions
diff --git a/drivers/platform/x86/dell-wmi.c b/drivers/platform/x86/dell-wmi.c index 67f3fe71c509..6561dfc028e5 100644 --- a/drivers/platform/x86/dell-wmi.c +++ b/drivers/platform/x86/dell-wmi.c | |||
@@ -238,6 +238,7 @@ static void dell_wmi_notify(u32 value, void *context) | |||
238 | input_sync(dell_wmi_input_dev); | 238 | input_sync(dell_wmi_input_dev); |
239 | } | 239 | } |
240 | } | 240 | } |
241 | kfree(obj); | ||
241 | } | 242 | } |
242 | 243 | ||
243 | 244 | ||
diff --git a/drivers/platform/x86/hp-wmi.c b/drivers/platform/x86/hp-wmi.c index 63c3e658a884..db10c5d007ec 100644 --- a/drivers/platform/x86/hp-wmi.c +++ b/drivers/platform/x86/hp-wmi.c | |||
@@ -381,6 +381,8 @@ static void hp_wmi_notify(u32 value, void *context) | |||
381 | } else | 381 | } else |
382 | printk(KERN_INFO "HP WMI: Unknown key pressed - %x\n", | 382 | printk(KERN_INFO "HP WMI: Unknown key pressed - %x\n", |
383 | eventcode); | 383 | eventcode); |
384 | |||
385 | kfree(obj); | ||
384 | } | 386 | } |
385 | 387 | ||
386 | static int __init hp_wmi_input_setup(void) | 388 | static int __init hp_wmi_input_setup(void) |
diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c index e425a868cd3a..9f93d6c0f510 100644 --- a/drivers/platform/x86/wmi.c +++ b/drivers/platform/x86/wmi.c | |||
@@ -540,8 +540,8 @@ EXPORT_SYMBOL_GPL(wmi_remove_notify_handler); | |||
540 | /** | 540 | /** |
541 | * wmi_get_event_data - Get WMI data associated with an event | 541 | * wmi_get_event_data - Get WMI data associated with an event |
542 | * | 542 | * |
543 | * @event - Event to find | 543 | * @event: Event to find |
544 | * &out - Buffer to hold event data | 544 | * @out: Buffer to hold event data. out->pointer should be freed with kfree() |
545 | * | 545 | * |
546 | * Returns extra data associated with an event in WMI. | 546 | * Returns extra data associated with an event in WMI. |
547 | */ | 547 | */ |