Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3e9b988e authored by Anisse Astier's avatar Anisse Astier Committed by Len Brown
Browse files

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: 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>
parent dcbfb815
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -238,6 +238,7 @@ static void dell_wmi_notify(u32 value, void *context)
			input_sync(dell_wmi_input_dev);
		}
	}
	kfree(obj);
}


+2 −0
Original line number Diff line number Diff line
@@ -381,6 +381,8 @@ static void hp_wmi_notify(u32 value, void *context)
	} else
		printk(KERN_INFO "HP WMI: Unknown key pressed - %x\n",
			eventcode);

	kfree(obj);
}

static int __init hp_wmi_input_setup(void)
+2 −2
Original line number Diff line number Diff line
@@ -540,8 +540,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.
 */