diff options
-rw-r--r-- | MdeModulePkg/Universal/Variable/Pei/Variable.c | 4 | ||||
-rw-r--r-- | SecurityPkg/VariableAuthenticated/Pei/Variable.c | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/MdeModulePkg/Universal/Variable/Pei/Variable.c b/MdeModulePkg/Universal/Variable/Pei/Variable.c index 4716cc5124..97c86f2feb 100644 --- a/MdeModulePkg/Universal/Variable/Pei/Variable.c +++ b/MdeModulePkg/Universal/Variable/Pei/Variable.c @@ -884,6 +884,8 @@ PeiGetVariable ( return EFI_INVALID_PARAMETER;
}
+ VariableHeader = NULL;
+
//
// Find existing variable
//
@@ -970,6 +972,8 @@ PeiGetNextVariableName ( return EFI_INVALID_PARAMETER;
}
+ VariableHeader = NULL;
+
Status = FindVariable (VariableName, VariableGuid, &Variable, &StoreInfo);
if (Variable.CurrPtr == NULL || Status != EFI_SUCCESS) {
return Status;
diff --git a/SecurityPkg/VariableAuthenticated/Pei/Variable.c b/SecurityPkg/VariableAuthenticated/Pei/Variable.c index 7ead809a3b..7ee8b88552 100644 --- a/SecurityPkg/VariableAuthenticated/Pei/Variable.c +++ b/SecurityPkg/VariableAuthenticated/Pei/Variable.c @@ -883,6 +883,8 @@ PeiGetVariable ( return EFI_INVALID_PARAMETER;
}
+ VariableHeader = NULL;
+
//
// Find existing variable
//
@@ -969,6 +971,8 @@ PeiGetNextVariableName ( return EFI_INVALID_PARAMETER;
}
+ VariableHeader = NULL;
+
Status = FindVariable (VariableName, VariableGuid, &Variable, &StoreInfo);
if (Variable.CurrPtr == NULL || Status != EFI_SUCCESS) {
return Status;
|