/*++\r
\r
-Copyright (c) 2006, Intel Corporation \r
+Copyright (c) 2006 - 2007, Intel Corporation \r
All rights reserved. This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
//\r
// Allocate credential file buffer.\r
//\r
- Status = gBS->AllocatePool (\r
- EfiBootServicesData,\r
- (UINTN) CredentialLen,\r
- &CredentialBuffer\r
- );\r
-\r
- if (EFI_ERROR (Status)) {\r
- return Status;\r
+ CredentialBuffer = AllocatePool ((UINTN) CredentialLen);\r
+ if (CredentialBuffer == NULL) {\r
+ return EFI_OUT_OF_RESOURCES;\r
}\r
//\r
// Download credential file.\r
);\r
\r
if (EFI_ERROR (Status)) {\r
- gBS->FreePool (CredentialBuffer);\r
+ FreePool (CredentialBuffer);\r
return Status;\r
}\r
//\r
Status = EFI_PROTOCOL_ERROR;\r
}\r
\r
- gBS->FreePool (CredentialBuffer);\r
+ FreePool (CredentialBuffer);\r
}\r
\r
return Status;\r