OpCode = EXPRESSION_OPCODE_FROM_LINK (Link);\r
RemoveEntryList (&OpCode->Link);\r
\r
- SafeFreePool (OpCode->ValueList);\r
+ if (OpCode->ValueList != NULL) {\r
+ FreePool (OpCode->ValueList);\r
+ }\r
}\r
\r
//\r
return;\r
}\r
\r
- SafeFreePool (Storage->Name);\r
- SafeFreePool (Storage->Buffer);\r
- SafeFreePool (Storage->EditBuffer);\r
+ FreePool (Storage->Name);\r
+ FreePool (Storage->Buffer);\r
+ FreePool (Storage->EditBuffer);\r
\r
while (!IsListEmpty (&Storage->NameValueListHead)) {\r
Link = GetFirstNode (&Storage->NameValueListHead);\r
NameValueNode = NAME_VALUE_NODE_FROM_LINK (Link);\r
RemoveEntryList (&NameValueNode->Link);\r
\r
- SafeFreePool (NameValueNode->Name);\r
- SafeFreePool (NameValueNode->Value);\r
- SafeFreePool (NameValueNode->EditValue);\r
- SafeFreePool (NameValueNode);\r
+ FreePool (NameValueNode->Name);\r
+ FreePool (NameValueNode->Value);\r
+ FreePool (NameValueNode->EditValue);\r
+ FreePool (NameValueNode);\r
}\r
\r
- SafeFreePool (Storage->ConfigHdr);\r
- SafeFreePool (Storage->ConfigRequest);\r
+ FreePool (Storage->ConfigHdr);\r
+ FreePool (Storage->ConfigRequest);\r
\r
- gBS->FreePool (Storage);\r
+ FreePool (Storage);\r
}\r
\r
\r
DestroyExpression (Expression);\r
}\r
\r
- SafeFreePool (Statement->VariableName);\r
- SafeFreePool (Statement->BlockName);\r
+ if (Statement->VariableName != NULL) {\r
+ FreePool (Statement->VariableName);\r
+ }\r
+ if (Statement->BlockName != NULL) {\r
+ FreePool (Statement->BlockName);\r
+ }\r
}\r
\r
\r
+\r
/**\r
Free resources of a Form\r
\r
//\r
// Free IFR binary buffer\r
//\r
- SafeFreePool (FormSet->IfrBinaryData);\r
+ FreePool (FormSet->IfrBinaryData);\r
\r
//\r
// Free FormSet Storage\r
}\r
}\r
\r
- SafeFreePool (FormSet->StatementBuffer);\r
- SafeFreePool (FormSet->ExpressionBuffer);\r
+ if (FormSet->StatementBuffer != NULL) {\r
+ FreePool (FormSet->StatementBuffer);\r
+ }\r
+ if (FormSet->ExpressionBuffer != NULL) {\r
+ FreePool (FormSet->ExpressionBuffer);\r
+ }\r
\r
- SafeFreePool (FormSet);\r
+ FreePool (FormSet);\r
}\r
\r
\r