wmi-acer: Use kzalloc to handle _WDG result
commitcd7e930b0724d5266676ab9b3d354b85d3e3e2da
authorCarlos Corbacho <cathectic@gmail.com>
Wed, 17 Oct 2007 17:34:38 +0000 (17 18:34 +0100)
committerCarlos Corbacho <cathectic@gmail.com>
Wed, 17 Oct 2007 17:35:45 +0000 (17 18:35 +0100)
treeed267efdf76b9361cda9990bd99484affb463a66
parent989224c982fac8293071234c67524838cd214659
wmi-acer: Use kzalloc to handle _WDG result

Currently, we use acpi_allocate_buffer() to produce and store the
results of our initial call to _WDG. Unfortunately, it would seem
that memory is liable to be overwritten on some systems by later
calls into ACPI (e.g. such as calling acpi_evaluate_object()).

So fix this by:

A) Allocating our own memory to hold the GUIDs from _WDG
B) Copy the output buffer from _WDG to our allocated memory
C) Free the original buffer, and keep our local copy
wmi-acer.c