1. add missing free operation in conditional branch.

2. when variable store header is invalid status, we will return EFI_VOLUME_CORRUPTED to let code assert, which is helpful to find root cause quickly.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7804 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
eric_tian 2009-03-05 02:59:11 +00:00
parent b23b4f1ade
commit 5bb820af59
2 changed files with 4 additions and 0 deletions

View File

@ -977,6 +977,7 @@ VariableCommonInitialize (
);
if (EFI_ERROR (Status)) {
FreePool(mVariableModuleGlobal);
return Status;
}
//

View File

@ -1984,6 +1984,9 @@ VariableCommonInitialize (
NULL,
&ReadyToBootEvent
);
} else {
Status = EFI_VOLUME_CORRUPTED;
DEBUG((EFI_D_INFO, "Variable Store header is corrupted\n"));
}
Done: