Blame SOURCES/0017-Error-check-the-right-thing-in-get_variable_attr-whe.patch
|
|
4210fa |
From 293f28d1fe3921c5348c60948b4dedcef5042d5b Mon Sep 17 00:00:00 2001
|
|
|
4210fa |
From: Peter Jones <pjones@redhat.com>
|
|
|
4210fa |
Date: Fri, 15 Nov 2013 10:55:37 -0500
|
|
|
4210fa |
Subject: [PATCH 17/74] Error check the right thing in get_variable_attr() when
|
|
|
4210fa |
allocating.
|
|
|
4210fa |
|
|
|
4210fa |
Signed-off-by: Peter Jones <pjones@redhat.com>
|
|
|
4210fa |
---
|
|
|
4210fa |
lib/variables.c | 2 +-
|
|
|
4210fa |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
4210fa |
|
|
|
4210fa |
diff --git a/lib/variables.c b/lib/variables.c
|
|
|
4210fa |
index 81bd34d..3a9735e 100644
|
|
|
4210fa |
--- a/lib/variables.c
|
|
|
4210fa |
+++ b/lib/variables.c
|
|
|
4210fa |
@@ -224,7 +224,7 @@ get_variable_attr(CHAR16 *var, UINT8 **data, UINTN *len, EFI_GUID owner,
|
|
|
4210fa |
return efi_status;
|
|
|
4210fa |
|
|
|
4210fa |
*data = AllocateZeroPool(*len);
|
|
|
4210fa |
- if (!data)
|
|
|
4210fa |
+ if (!*data)
|
|
|
4210fa |
return EFI_OUT_OF_RESOURCES;
|
|
|
4210fa |
|
|
|
4210fa |
efi_status = uefi_call_wrapper(RT->GetVariable, 5, var, &owner,
|
|
|
4210fa |
--
|
|
|
4210fa |
1.9.3
|
|
|
4210fa |
|