]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/BdsDxe/BootMaint/BmLib.c
Remove SafeFreePool from MemoryAllocationLib as this API's name is misleading. Its...
[mirror_edk2.git] / MdeModulePkg / Universal / BdsDxe / BootMaint / BmLib.c
index 2e4b1c6fb271e5d1e5ed6c2f464221c0fe9e7867..9ef2f7f034c1a07f209993a28dd1a95078ec05ee 100644 (file)
@@ -125,7 +125,9 @@ EfiGrowBuffer (
   TryAgain = FALSE;\r
   if (*Status == EFI_BUFFER_TOO_SMALL) {\r
 \r
-    SafeFreePool (*Buffer);\r
+    if (*Buffer != NULL) {\r
+      FreePool (*Buffer);\r
+    }\r
 \r
     *Buffer = AllocateZeroPool (BufferSize);\r
 \r
@@ -139,7 +141,7 @@ EfiGrowBuffer (
   // If there's an error, free the buffer\r
   //\r
   if (!TryAgain && EFI_ERROR (*Status) && (*Buffer != NULL)) {\r
-    SafeFreePool (*Buffer);\r
+    FreePool (*Buffer);\r
     *Buffer = NULL;\r
   }\r
 \r
@@ -201,7 +203,7 @@ EfiLibDeleteVariable (
     //\r
     Status = gRT->SetVariable (VarName, VarGuid, VAR_FLAG, 0, NULL);\r
     ASSERT (!EFI_ERROR (Status));\r
-    SafeFreePool (VarBuf);\r
+    FreePool (VarBuf);\r
   }\r
 \r
   return Status;\r
@@ -373,7 +375,7 @@ EfiReallocatePool (
       CopyMem (NewPool, OldPool, OldSize < NewSize ? OldSize : NewSize);\r
     }\r
 \r
-    SafeFreePool (OldPool);\r
+    FreePool (OldPool);\r
   }\r
 \r
   return NewPool;\r