]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/HiiDatabase.c
Remove SafeFreePool from MemoryAllocationLib as this API's name is misleading. Its...
[mirror_edk2.git] / EdkCompatibilityPkg / Compatibility / FrameworkHiiToUefiHiiThunk / HiiDatabase.c
index 845a9f72e0c84918f3a48edafe08ec2d4a50a1d9..c6b30cb85ae4aef9424670f72a9bfd3e0b7a5706 100644 (file)
@@ -408,7 +408,9 @@ Returns:
 \r
 Done:\r
   FreePool (LangCodes3066);\r
-  SafeFreePool (LangCodes639);\r
+  if (LangCodes639 != NULL) {\r
+    FreePool (LangCodes639);\r
+  }\r
 \r
   return Status;\r
 }\r
@@ -491,11 +493,18 @@ Returns:
   *LanguageString = AsciiStrToUnicodeStr (SecLangCodes639, UnicodeSecLangCodes639);\r
 \r
 Done:\r
-  \r
-  SafeFreePool (PrimaryLang639);\r
-  SafeFreePool (SecLangCodes639);\r
-  SafeFreePool (SecLangCodes3066);\r
-  SafeFreePool (UnicodeSecLangCodes639);\r
+  if (PrimaryLang639 != NULL) {\r
+    FreePool (PrimaryLang639);\r
+  }\r
+  if (SecLangCodes639 != NULL) {\r
+    FreePool (SecLangCodes639);\r
+  }\r
+  if (SecLangCodes3066 != NULL) {\r
+    FreePool (SecLangCodes3066);\r
+  }\r
+  if (UnicodeSecLangCodes639 != NULL) {\r
+    FreePool (UnicodeSecLangCodes639);\r
+  }\r
   \r
   return Status;\r
 }\r