diff options
author | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-01-05 02:20:16 +0000 |
---|---|---|
committer | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-01-05 02:20:16 +0000 |
commit | 779808545d68d77a5280a1c323066594808c2d5f (patch) | |
tree | 9368d784d75295bd1156901f046c14b6a422d4ac /MdeModulePkg/Universal | |
parent | 54cdf471a085f9249a6fbfb20d4828d6cd2ce1cb (diff) | |
download | edk2-779808545d68d77a5280a1c323066594808c2d5f.zip edk2-779808545d68d77a5280a1c323066594808c2d5f.tar.gz edk2-779808545d68d77a5280a1c323066594808c2d5f.tar.bz2 |
Fix VS2005 build error
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7181 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal')
-rw-r--r-- | MdeModulePkg/Universal/FirmwareVolume/FaultTolerantWriteDxe/FtwLite.c | 15 | ||||
-rw-r--r-- | MdeModulePkg/Universal/PlatformDriverOverride/PlatOverMngr/PlatOverMngr.c | 4 |
2 files changed, 10 insertions, 9 deletions
diff --git a/MdeModulePkg/Universal/FirmwareVolume/FaultTolerantWriteDxe/FtwLite.c b/MdeModulePkg/Universal/FirmwareVolume/FaultTolerantWriteDxe/FtwLite.c index 76e3cb3..9a999c9 100644 --- a/MdeModulePkg/Universal/FirmwareVolume/FaultTolerantWriteDxe/FtwLite.c +++ b/MdeModulePkg/Universal/FirmwareVolume/FaultTolerantWriteDxe/FtwLite.c @@ -622,13 +622,7 @@ InitializeFtwLite ( FtwLiteDevice = NULL;
FtwLiteDevice = AllocatePool (sizeof (EFI_FTW_LITE_DEVICE) + Length);
- if (FtwLiteDevice != NULL) {
- Status = EFI_SUCCESS;
- } else {
- Status = EFI_OUT_OF_RESOURCES;
- }
-
- ASSERT_EFI_ERROR (Status);
+ ASSERT (FtwLiteDevice != NULL);
ZeroMem (FtwLiteDevice, sizeof (EFI_FTW_LITE_DEVICE));
FtwLiteDevice->Signature = FTW_LITE_DEVICE_SIGNATURE;
@@ -791,7 +785,8 @@ InitializeFtwLite ( (FtwLiteDevice->FtwSpareLba == (EFI_LBA) (-1))
) {
DEBUG ((EFI_D_ERROR, "FtwLite: Working or spare FVB not ready\n"));
- ASSERT_EFI_ERROR (Status);
+ FreePool (FtwLiteDevice);
+ return EFI_ABORTED;
}
//
// Refresh workspace data from working block
@@ -831,6 +826,7 @@ InitializeFtwLite ( //
Status = WorkSpaceRefresh (FtwLiteDevice);
if (EFI_ERROR (Status)) {
+ FreePool (FtwLiteDevice);
return EFI_ABORTED;
}
} else {
@@ -850,6 +846,7 @@ InitializeFtwLite ( Status = FtwReclaimWorkSpace (FtwLiteDevice, FALSE);
if (EFI_ERROR (Status)) {
+ FreePool (FtwLiteDevice);
return EFI_ABORTED;
}
}
@@ -869,6 +866,7 @@ InitializeFtwLite ( &FtwLiteDevice->FtwLiteInstance
);
if (EFI_ERROR (Status)) {
+ FreePool (FtwLiteDevice);
return EFI_ABORTED;
}
//
@@ -912,6 +910,7 @@ InitializeFtwLite ( Status = FtwReclaimWorkSpace (FtwLiteDevice, TRUE);
if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_FTW_LITE, "FtwLite: Workspace reclaim - %r\n", Status));
+ FreePool (FtwLiteDevice);
return EFI_ABORTED;
}
}
diff --git a/MdeModulePkg/Universal/PlatformDriverOverride/PlatOverMngr/PlatOverMngr.c b/MdeModulePkg/Universal/PlatformDriverOverride/PlatOverMngr/PlatOverMngr.c index ebd9d18..e4ea60c 100644 --- a/MdeModulePkg/Universal/PlatformDriverOverride/PlatOverMngr/PlatOverMngr.c +++ b/MdeModulePkg/Universal/PlatformDriverOverride/PlatOverMngr/PlatOverMngr.c @@ -468,6 +468,7 @@ UpdateDeviceSelectPage ( //
Len = StrSize (ControllerName);
NewString = AllocateZeroPool (Len + StrSize (L"--"));
+ ASSERT (NewString != NULL);
if (EFI_ERROR (CheckMapping (ControllerDevicePath,NULL, &mMappingDataBase, NULL, NULL))) {
StrCat (NewString, L"--");
} else {
@@ -762,6 +763,7 @@ UpdateBindingDriverSelectPage ( // First create the driver image name
//
NewString = AllocateZeroPool (StrSize (DriverName));
+ ASSERT (NewString != NULL);
if (EFI_ERROR (CheckMapping (mControllerDevicePathProtocol[mSelectedCtrIndex], LoadedImageDevicePath, &mMappingDataBase, NULL, NULL))) {
FakeNvData->DriSelection[Index] = 0x00;
} else {
@@ -894,7 +896,7 @@ UpdatePrioritySelectPage ( }
IfrOptionList = AllocateZeroPool (sizeof (IFR_OPTION) * mSelectedDriverImageNum);
- ASSERT_EFI_ERROR (IfrOptionList != NULL);
+ ASSERT (IfrOptionList != NULL);
//
// Create order list for those selected drivers
//
|