Blob Blame History Raw
From 293f28d1fe3921c5348c60948b4dedcef5042d5b Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Fri, 15 Nov 2013 10:55:37 -0500
Subject: [PATCH 17/74] Error check the right thing in get_variable_attr() when
 allocating.

Signed-off-by: Peter Jones <pjones@redhat.com>
---
 lib/variables.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/variables.c b/lib/variables.c
index 81bd34d..3a9735e 100644
--- a/lib/variables.c
+++ b/lib/variables.c
@@ -224,7 +224,7 @@ get_variable_attr(CHAR16 *var, UINT8 **data, UINTN *len, EFI_GUID owner,
 		return efi_status;
 
 	*data = AllocateZeroPool(*len);
-	if (!data)
+	if (!*data)
 		return EFI_OUT_OF_RESOURCES;
 	
 	efi_status = uefi_call_wrapper(RT->GetVariable, 5, var, &owner,
-- 
1.9.3