diff options
author | eric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-03-05 02:59:11 +0000 |
---|---|---|
committer | eric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-03-05 02:59:11 +0000 |
commit | 5bb820af594a34f4fa69e609e04a624527f1327d (patch) | |
tree | e3d3380b084b74de77b952c1e3af2f7293cd6025 /MdeModulePkg | |
parent | b23b4f1adeaacce44ee50df85d57534187137d5a (diff) | |
download | edk2-5bb820af594a34f4fa69e609e04a624527f1327d.zip edk2-5bb820af594a34f4fa69e609e04a624527f1327d.tar.gz edk2-5bb820af594a34f4fa69e609e04a624527f1327d.tar.bz2 |
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
Diffstat (limited to 'MdeModulePkg')
-rw-r--r-- | MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c | 1 | ||||
-rw-r--r-- | MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c b/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c index f17dab0..1714eba 100644 --- a/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c +++ b/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c @@ -977,6 +977,7 @@ VariableCommonInitialize ( );
if (EFI_ERROR (Status)) {
+ FreePool(mVariableModuleGlobal);
return Status;
}
//
diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c index d25fe03..597919a 100644 --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c @@ -1984,6 +1984,9 @@ VariableCommonInitialize ( NULL,
&ReadyToBootEvent
);
+ } else {
+ Status = EFI_VOLUME_CORRUPTED;
+ DEBUG((EFI_D_INFO, "Variable Store header is corrupted\n"));
}
Done:
|