]> git.proxmox.com Git - mirror_edk2.git/blobdiff - PerformancePkg/Dp_App/DpUtilities.c
Move some define code to the uni file. Also fixed some memory leak.
[mirror_edk2.git] / PerformancePkg / Dp_App / DpUtilities.c
index 1c40e8395040e92ff4ceb5c3c6cd8957f3f0ff4e..48e2952aa79eed2d108de7a1bb3e37717d7dc7d1 100644 (file)
@@ -206,6 +206,7 @@ GetNameFromHandle (
                   );\r
     if (EFI_ERROR (Status)) {\r
       StrCpy (mGaugeString, StringPtr);\r
+      FreePool (StringPtr);\r
       return ;\r
     }\r
 \r
@@ -225,6 +226,7 @@ GetNameFromHandle (
   } else {\r
     StrCpy (mGaugeString, StringPtr);\r
   }\r
+  FreePool (StringPtr);\r
   return ;\r
 }\r
 \r
@@ -289,6 +291,7 @@ PrintToken (
   if (Return > 0 && gST->ConOut != NULL) {\r
     gST->ConOut->OutputString (gST->ConOut, mPrintTokenBuffer);\r
   }\r
+  FreePool (StringPtr);\r
   return Return;\r
 }\r
 \r