]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Fix FreePoll() bugs in some places.
authorgdong1 <gdong1@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 8 Jan 2009 09:37:30 +0000 (09:37 +0000)
committergdong1 <gdong1@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 8 Jan 2009 09:37:30 +0000 (09:37 +0000)
Removed the dependency to MdeModulePkg in the HiiLibFramework
Removed EDK_RELEASE_VERSION and EFI_SPECIFICATION_VERSION in the Framework inf file.
other coding style changes

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7218 6f19259b-4bc3-4df7-8a09-765794883524

IntelFrameworkPkg/Library/FrameworkHiiLib/HiiLib.inf
IntelFrameworkPkg/Library/FrameworkIfrSupportLib/IfrCommon.c
IntelFrameworkPkg/Library/FrameworkIfrSupportLib/IfrOnTheFly.c
IntelFrameworkPkg/Library/FrameworkIfrSupportLib/IfrSupportLib.inf
IntelFrameworkPkg/Library/FrameworkUefiLib/FrameworkUefiLib.inf
IntelFrameworkPkg/Library/HiiLibFramework/HiiLibFramework.c
IntelFrameworkPkg/Library/HiiLibFramework/HiiLibFramework.inf

index 5880d4aa7780969e536547341753aff43dddf0d9..f2db95a9714137555c882b2c4a3ef40a095cf673 100644 (file)
@@ -1,8 +1,8 @@
 #/** @file\r
-# Library instance for HII common routines.\r
+#  Library instance for HII common routines.\r
+#  This library instance implements the common HII routines.\r
 #\r
-# This library instance implements the common HII routines.\r
-# Copyright (c) 2006, Intel Corporation\r
+#  Copyright (c) 2006, Intel Corporation.\r
 #\r
 #  All rights reserved. This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
   MODULE_TYPE                    = DXE_DRIVER\r
   VERSION_STRING                 = 1.0\r
   LIBRARY_CLASS                  = FrameworkHiiLib,HiiLib|DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER\r
-  EDK_RELEASE_VERSION            = 0x00020000\r
-  EFI_SPECIFICATION_VERSION      = 0x00020000\r
-\r
+  PI_SPECIFICATION_VERSION       = 0x00000009\r
   CONSTRUCTOR                    = FrameworkHiiLibConstructor\r
 \r
-\r
 #\r
 # The following information is for reference only and not required by the build tools.\r
 #\r
index 6ec7dc88387edd9c31772fd054f0966a60022cd4..9bc82f16b7b47038a0280c90de0289fda176eb97 100644 (file)
@@ -804,6 +804,7 @@ ValidateDataFromHiiHandle (
   //\r
   VariableData = AllocateZeroPool (SizeOfNvStore);\r
   if (VariableData == NULL) {\r
+    FreePool (OldData);\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
 \r
@@ -832,6 +833,7 @@ ValidateDataFromHiiHandle (
 \r
       VariableData = AllocatePool (SizeOfNvStore);\r
       if (VariableData == NULL) {\r
+        FreePool (OldData);\r
         return EFI_OUT_OF_RESOURCES;\r
       }\r
 \r
@@ -875,7 +877,7 @@ ValidateDataFromHiiHandle (
       //\r
       if (!GotMatch) {\r
         *Results = FALSE;\r
-        return EFI_SUCCESS;\r
+        goto EXIT;\r
       }\r
       break;\r
 \r
@@ -886,7 +888,7 @@ ValidateDataFromHiiHandle (
       //\r
       if (VariableData[((FRAMEWORK_EFI_IFR_CHECKBOX *) &RawData[Index])->QuestionId] > 1) {\r
         *Results = FALSE;\r
-        return EFI_SUCCESS;\r
+        goto EXIT;\r
       }\r
       break;\r
 \r
@@ -894,7 +896,7 @@ ValidateDataFromHiiHandle (
         if ((VariableData[((FRAMEWORK_EFI_IFR_NUMERIC *)&RawData[Index])->QuestionId] < ((FRAMEWORK_EFI_IFR_NUMERIC *)&RawData[Index])->Minimum) ||\r
             (VariableData[((FRAMEWORK_EFI_IFR_NUMERIC *)&RawData[Index])->QuestionId] > ((FRAMEWORK_EFI_IFR_NUMERIC *)&RawData[Index])->Maximum)) {\r
         *Results = FALSE;\r
-        return EFI_SUCCESS;\r
+        goto EXIT;\r
       }\r
       break;\r
 \r
@@ -903,11 +905,12 @@ ValidateDataFromHiiHandle (
     Index = RawData[Index + 1] + Index;\r
   }\r
 \r
+EXIT: \r
   //\r
   // Free our temporary repository of form data\r
   //\r
-  gBS->FreePool (OldData);\r
-  gBS->FreePool (VariableData);\r
+  FreePool (OldData);\r
+  FreePool (VariableData);\r
 \r
   return EFI_SUCCESS;\r
 }\r
index 4bdc40e54bce4428f2626b34554cccec6245bd12..99386adac030ccd3ed4b45ec7111752a11b76f9a 100644 (file)
@@ -72,6 +72,8 @@ CreateFormSet (
   GetCurrentLanguage (CurrentLanguage);\r
   Status = AddString (*StringBuffer, CurrentLanguage, FormSetTitle, &StringToken);\r
   if (EFI_ERROR (Status)) {\r
+    FreePool (FormBuffer);\r
+    FreePool (StringBuffer);\r
     return Status;\r
   }\r
 \r
index 442bb4a2fdd256268684531f72e72551bedc57cf..d2cbdfaa1c7c901c813c3b7e825c45228c700f08 100644 (file)
@@ -1,9 +1,10 @@
 #/** @file\r
 # EDK Internal Form Refresentation Support Library Instance.\r
 #\r
-# The library instance provides common library routines help in \r
-#  IFR creation on-the-fly, HII variable access, HII database access, multi language supports.\r
-# Copyright (c) 2006 - 2007, Intel Corporation.\r
+#  The library instance provides common library routines help in IFR creation on-the-fly,\r
+#  HII variable access, HII database access, multi language supports.\r
+#\r
+#  Copyright (c) 2006 - 2007, Intel Corporation.\r
 #\r
 #  All rights reserved. This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
@@ -22,8 +23,7 @@
   MODULE_TYPE                    = DXE_DRIVER\r
   VERSION_STRING                 = 1.0\r
   LIBRARY_CLASS                  = FrameworkIfrSupportLib|DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER \r
-  EDK_RELEASE_VERSION            = 0x00020000\r
-  EFI_SPECIFICATION_VERSION      = 0x00020000\r
+  PI_SPECIFICATION_VERSION       = 0x00000009\r
 \r
 #\r
 # The following information is for reference only and not required by the build tools.\r
   IfrCommon.c\r
   IfrSupportLibInternal.h\r
 \r
-\r
 [Packages]\r
   MdePkg/MdePkg.dec\r
   IntelFrameworkPkg/IntelFrameworkPkg.dec\r
 \r
-\r
 [LibraryClasses]\r
   UefiRuntimeServicesTableLib\r
   UefiBootServicesTableLib\r
   BaseLib\r
   DebugLib\r
 \r
-\r
 [Guids]\r
-  gEfiGlobalVariableGuid                        # ALWAYS_CONSUMED\r
-\r
+  gEfiGlobalVariableGuid                        # CONSUMED, Variable Name: L"Lan"\r
 \r
 [Protocols]\r
   gEfiHiiProtocolGuid                           # PROTOCOL ALWAYS_CONSUMED\r
-\r
index 91285620f44bc660da4c5d439c09dc7e9beb506b..14bd3889a5558db0bc01ebf7c3c9c4c4d142710f 100644 (file)
@@ -1,11 +1,13 @@
 #/** @file\r
-# Component description file for the entry point to a EFIDXE Drivers\r
+#  Component description file for the entry point to a EFIDXE Drivers\r
 #\r
-# Library to abstract Framework extensions that conflict with UEFI 2.0 Specification\r
+#  Library to abstract Framework extensions that conflict with UEFI 2.0 Specification.\r
+#  Help Port Framework/Tinao code that has conflicts with UEFI 2.0 by hiding the oldconflicts \r
+#  with library functions and supporting implementations of the old (EDK/EFI 1.10) and new \r
+#  (EDK II/UEFI 2.0) way. This module is a DXE driver as it contains DXE enum extensions for \r
+#  EFI event services.\r
 #\r
-#  Help Port Framework/Tinao code that has conflicts with UEFI 2.0 by hiding the oldconflicts with library functions and supporting implementations of the old\r
-#  (EDK/EFI 1.10) and new (EDK II/UEFI 2.0) way. This module is a DXE driver as it contains DXE enum extensions for EFI event services.\r
-# Copyright (c) 2006, Intel Corporation.\r
+#  Copyright (c) 2006, Intel Corporation.\r
 #\r
 #  All rights reserved. This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
@@ -25,7 +27,6 @@
   VERSION_STRING                 = 1.0\r
   LIBRARY_CLASS                  = UefiLib|DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER\r
 \r
-\r
 #\r
 #  VALID_ARCHITECTURES           = IA32 X64 IPF EBC\r
 #\r
   UefiLib.c\r
   UefiLibInternal.h\r
 \r
-\r
 [Packages]\r
   MdePkg/MdePkg.dec\r
   IntelFrameworkPkg/IntelFrameworkPkg.dec\r
 \r
-\r
 [LibraryClasses]\r
   PrintLib\r
   PcdLib\r
@@ -59,7 +58,6 @@
   gEfiEventReadyToBootGuid                      # ALWAYS_CONSUMED\r
   gEfiEventLegacyBootGuid                       # ALWAYS_CONSUMED\r
 \r
-\r
 [Protocols]\r
   gEfiDriverBindingProtocolGuid                 # ALWAYS_CONSUMED\r
   gEfiSimpleTextOutProtocolGuid                 # ALWAYS_CONSUMED\r
@@ -84,5 +82,3 @@
   gEfiMdePkgTokenSpaceGuid.PcdComponentName2Disable\r
   gEfiMdePkgTokenSpaceGuid.PcdUgaConsumeSupport\r
 \r
-\r
-\r
index b24355494de4078fa2dc2ffbf1015e7784c6203e..a72bf9c2390924e274e2daa26b3724c2d439a02c 100644 (file)
@@ -17,7 +17,6 @@
 \r
 #include <Protocol/FrameworkHii.h>\r
 \r
-#include <Library/HiiLib.h>\r
 #include <Library/DebugLib.h>\r
 #include <Library/UefiBootServicesTableLib.h>\r
 #include <Library/MemoryAllocationLib.h>\r
index 0aab12e2e3a8055ab557549d3fe99373c096b7e9..361342f9eb9dc0520f626244af31ac0e5a60f897 100644 (file)
@@ -1,8 +1,9 @@
 #/** @file\r
-# Library instance for HII common routines.\r
+#  Library instance for HII common routines.\r
 #\r
-# This library instance implements the common HII routines.\r
-# Copyright (c) 2006, Intel Corporation\r
+#  This library instance implements the common HII routines.\r
+#\r
+#  Copyright (c) 2006, Intel Corporation\r
 #\r
 #  All rights reserved. This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
   MODULE_TYPE                    = DXE_DRIVER\r
   VERSION_STRING                 = 1.0\r
   LIBRARY_CLASS                  = HiiLib|DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER\r
-  EDK_RELEASE_VERSION            = 0x00020000\r
-  EFI_SPECIFICATION_VERSION      = 0x00020000\r
+  PI_SPECIFICATION_VERSION       = 0x00000009\r
   \r
   CONSTRUCTOR                    = HiiLibFrameworkConstructor\r
 \r
-\r
-\r
 #\r
 # The following information is for reference only and not required by the build tools.\r
 #\r
 \r
 [Packages]\r
   MdePkg/MdePkg.dec\r
-  MdeModulePkg/MdeModulePkg.dec\r
   IntelFrameworkPkg/IntelFrameworkPkg.dec\r
 \r
 [LibraryClasses]\r
   MemoryAllocationLib\r
+  UefiBootServicesTableLib\r
   DebugLib\r
 \r
+[Protocols]\r
+  gEfiHiiProtocolGuid                           # PROTOCOL ALWAYS_CONSUMED\r
+\r
+[Depex]\r
+  gEfiHiiProtocolGuid\r