x86/efi: Fix dummy variable buffer allocation
authorBen Hutchings <ben@decadent.org.uk>
Sun, 16 Jun 2013 20:27:12 +0000 (21:27 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jun 2013 17:38:44 +0000 (10:38 -0700)
commit5440f5d68b518339a9ee2fdc838c8caef19e36de
tree85e4ea7949fe546bbd0b855cf66c899d7262effa
parent04778bad36603c0ced7f1540671de81e9b41ef0c
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/platform/efi/efi.c