summaryrefslogtreecommitdiff
path: root/EdkModulePkg/Universal/Network/PxeBc/Dxe/pxe_loadfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'EdkModulePkg/Universal/Network/PxeBc/Dxe/pxe_loadfile.c')
-rw-r--r--EdkModulePkg/Universal/Network/PxeBc/Dxe/pxe_loadfile.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/EdkModulePkg/Universal/Network/PxeBc/Dxe/pxe_loadfile.c b/EdkModulePkg/Universal/Network/PxeBc/Dxe/pxe_loadfile.c
index 6659bc4022..3dceefb945 100644
--- a/EdkModulePkg/Universal/Network/PxeBc/Dxe/pxe_loadfile.c
+++ b/EdkModulePkg/Universal/Network/PxeBc/Dxe/pxe_loadfile.c
@@ -1,6 +1,6 @@
/*++
-Copyright (c) 2006, Intel Corporation
+Copyright (c) 2006 - 2007, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -1168,14 +1168,9 @@ Returns:
//
// Allocate credential file buffer.
//
- Status = gBS->AllocatePool (
- EfiBootServicesData,
- (UINTN) CredentialLen,
- &CredentialBuffer
- );
-
- if (EFI_ERROR (Status)) {
- return Status;
+ CredentialBuffer = AllocatePool ((UINTN) CredentialLen);
+ if (CredentialBuffer == NULL) {
+ return EFI_OUT_OF_RESOURCES;
}
//
// Download credential file.
@@ -1196,7 +1191,7 @@ Returns:
);
if (EFI_ERROR (Status)) {
- gBS->FreePool (CredentialBuffer);
+ FreePool (CredentialBuffer);
return Status;
}
//
@@ -1211,7 +1206,7 @@ Returns:
Status = EFI_PROTOCOL_ERROR;
}
- gBS->FreePool (CredentialBuffer);
+ FreePool (CredentialBuffer);
}
return Status;