]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/SetupBrowserDxe/Setup.c
Remove SafeFreePool from MemoryAllocationLib as this API's name is misleading. Its...
[mirror_edk2.git] / MdeModulePkg / Universal / SetupBrowserDxe / Setup.c
index f728d53910eff770021702eb195a10a1cc89141c..29b606fdeff06b5112641ea3068ebd5a643d0b39 100644 (file)
@@ -724,7 +724,9 @@ NewStringCpy (
   IN CHAR16           *Src\r
   )\r
 {\r
-  SafeFreePool (*Dest);\r
+  if (*Dest != NULL) {\r
+    FreePool (*Dest);\r
+  }\r
   *Dest = AllocateCopyPool (StrSize (Src), Src);\r
   ASSERT (*Dest != NULL);\r
 }\r
@@ -865,7 +867,9 @@ SetValueByName (
     Node = NAME_VALUE_NODE_FROM_LINK (Link);\r
 \r
     if (StrCmp (Name, Node->Name) == 0) {\r
-      SafeFreePool (Node->EditValue);\r
+      if (Node->EditValue != NULL) {\r
+        FreePool (Node->EditValue);\r
+      }\r
       Node->EditValue = AllocateCopyPool (StrSize (Value), Value);\r
       ASSERT (Node->EditValue != NULL);\r
       return EFI_SUCCESS;\r