]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/UefiIfrParserExpression.c
Remove SafeFreePool from MemoryAllocationLib as this API's name is misleading. Its...
[mirror_edk2.git] / EdkCompatibilityPkg / Compatibility / FrameworkHiiToUefiHiiThunk / UefiIfrParserExpression.c
index caeb576336b9460df71bdb3aac336963e3ced8dc..1fc398fed222fe9b25a98335ebd4fd5af61a51a5 100644 (file)
@@ -732,9 +732,15 @@ IfrCatenate (
   Result->Value.string = NewString (StringPtr, FormSet->HiiHandle);\r
 \r
 Done:\r
-  SafeFreePool (String[0]);\r
-  SafeFreePool (String[1]);\r
-  SafeFreePool (StringPtr);\r
+  if (String[0] != NULL) {\r
+    FreePool (String[0]);\r
+  }\r
+  if (String[1] != NULL) {\r
+    FreePool (String[1]);\r
+  }  \r
+  if (StringPtr != NULL) {\r
+    FreePool (StringPtr);\r
+  }\r
 \r
   return Status;\r
 }\r
@@ -790,8 +796,12 @@ IfrMatch (
   Result->Value.b = mUnicodeCollation->MetaiMatch (mUnicodeCollation, String[0], String[1]);\r
 \r
 Done:\r
-  SafeFreePool (String[0]);\r
-  SafeFreePool (String[1]);\r
+  if (String[0] != NULL) {\r
+    FreePool (String[0]);\r
+  }\r
+  if (String[1] != NULL) {\r
+    FreePool (String[1]);\r
+  }  \r
 \r
   return Status;\r
 }\r
@@ -875,8 +885,12 @@ IfrFind (
   }\r
 \r
 Done:\r
-  SafeFreePool (String[0]);\r
-  SafeFreePool (String[1]);\r
+  if (String[0] != NULL) {\r
+    FreePool (String[0]);\r
+  }\r
+  if (String[1] != NULL) {\r
+    FreePool (String[1]);\r
+  }  \r
 \r
   return Status;\r
 }\r
@@ -1045,8 +1059,12 @@ IfrToken (
   Result->Value.string = NewString (SubString, FormSet->HiiHandle);\r
 \r
 Done:\r
-  SafeFreePool (String[0]);\r
-  SafeFreePool (String[1]);\r
+  if (String[0] != NULL) {\r
+    FreePool (String[0]);\r
+  }\r
+  if (String[1] != NULL) {\r
+    FreePool (String[1]);\r
+  }  \r
 \r
   return Status;\r
 }\r
@@ -1149,8 +1167,12 @@ IfrSpan (
   Result->Value.u64 = StringPtr - String[1];\r
 \r
 Done:\r
-  SafeFreePool (String[0]);\r
-  SafeFreePool (String[1]);\r
+  if (String[0] != NULL) {\r
+    FreePool (String[0]);\r
+  }\r
+  if (String[1] != NULL) {\r
+    FreePool (String[1]);\r
+  }  \r
 \r
   return Status;\r
 }\r