x86/efi: Fix dummy variable buffer allocation
commitb35b16d2be61943373f16ceb6184a66da84ab229
authorBen Hutchings <ben@decadent.org.uk>
Sun, 16 Jun 2013 20:27:12 +0000 (16 21:27 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Sat, 29 Jun 2013 03:06:32 +0000 (29 04:06 +0100)
tree7941fa3adf46cadcf25c946ec75015f0f612381f
parent134c3faa909c12ae1b9c3a37a5e733b1f6c3dfab
x86/efi: Fix dummy variable buffer allocation

commit b8cb62f82103083a6e8fa5470bfe634a2c06514d upstream.

1. Check for allocation failure
2. Clear the buffer contents, as they may actually be written to flash
3. Don't leak the buffer

Compile-tested only.

[ Tested successfully on my buggy ASUS machine - Matt ]

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
arch/x86/platform/efi/efi.c