fixes for NULL verification.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11125 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
jcarsey
2010-12-06 18:10:34 +00:00
parent eca37a3101
commit c154b99708
3 changed files with 109 additions and 105 deletions

View File

@ -183,7 +183,7 @@ GetEnvironmentVariableList(
Status = SHELL_GET_ENVIRONMENT_VARIABLE_AND_ATTRIBUTES(VariableName, &VarList->Atts, &ValSize, VarList->Val);
}
}
if (!EFI_ERROR(Status)) {
if (!EFI_ERROR(Status) && VarList != NULL) {
VarList->Key = AllocatePool(StrSize(VariableName));
if (VarList->Key == NULL) {
SHELL_FREE_NON_NULL(VarList->Val);