/** @file\r
The implementation of IPSEC_CONFIG_PROTOCOL.\r
\r
- Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
VariableNameISizeNew,\r
VariableNameI\r
);\r
+ if (VariableNameI == NULL) {\r
+ Status = EFI_OUT_OF_RESOURCES;\r
+ break;\r
+ }\r
VariableNameISize = VariableNameISizeNew;\r
\r
Status = gRT->GetNextVariableName (\r
}\r
\r
ON_EXIT:\r
- FreePool (VariableNameI);\r
+ if (VariableNameI != NULL) {\r
+ FreePool (VariableNameI);\r
+ }\r
return Status;\r
}\r
\r
Buffer->Capacity += EntrySize;\r
TempPoint = AllocatePool (Buffer->Capacity);\r
\r
- if (Buffer->Ptr == NULL) {\r
+ if (TempPoint == NULL) {\r
return EFI_OUT_OF_RESOURCES;\r
}\r
//\r