Cc: Qiu Shumin <shumin....@intel.com>
Cc: Eric Dong <eric.d...@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan...@intel.com>
Reviewed-by: Eric Dong <eric.d...@intel.com>
---
 MdeModulePkg/Universal/DisplayEngineDxe/InputHandler.c   | 5 +----
 MdeModulePkg/Universal/DisplayEngineDxe/ProcessOptions.c | 3 ++-
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/MdeModulePkg/Universal/DisplayEngineDxe/InputHandler.c 
b/MdeModulePkg/Universal/DisplayEngineDxe/InputHandler.c
index 732dd2f..8e7b735 100644
--- a/MdeModulePkg/Universal/DisplayEngineDxe/InputHandler.c
+++ b/MdeModulePkg/Universal/DisplayEngineDxe/InputHandler.c
@@ -1,9 +1,9 @@
 /** @file
 Implementation for handling user input from the User Interfaces.
 
-Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>
 This program and the accompanying materials
 are licensed and made available under the terms and conditions of the BSD 
License
 which accompanies this distribution.  The full text of the license may be 
found at
 http://opensource.org/licenses/bsd-license.php
 
@@ -1297,13 +1297,10 @@ GetSelectionInputPopUp (
   ValueType         = 0;
   CurrentOption     = NULL;
   ShowDownArrow     = FALSE;
   ShowUpArrow       = FALSE;
 
-  StringPtr = AllocateZeroPool ((gOptionBlockWidth + 1) * 2);
-  ASSERT (StringPtr);
-
   ZeroMem (&HiiValue, sizeof (EFI_HII_VALUE));
 
   Question = MenuOption->ThisTag;
   if (Question->OpCode->OpCode == EFI_IFR_ORDERED_LIST_OP) {
     Link = GetFirstNode (&Question->OptionListHead);
diff --git a/MdeModulePkg/Universal/DisplayEngineDxe/ProcessOptions.c 
b/MdeModulePkg/Universal/DisplayEngineDxe/ProcessOptions.c
index bb2faf3..16aaf6c 100644
--- a/MdeModulePkg/Universal/DisplayEngineDxe/ProcessOptions.c
+++ b/MdeModulePkg/Universal/DisplayEngineDxe/ProcessOptions.c
@@ -1,10 +1,10 @@
 /** @file
 Implementation for handling the User Interface option processing.
 
 
-Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>
 This program and the accompanying materials
 are licensed and made available under the terms and conditions of the BSD 
License
 which accompanies this distribution.  The full text of the license may be 
found at
 http://opensource.org/licenses/bsd-license.php
 
@@ -884,10 +884,11 @@ PasswordProcess (
     gUserInput->InputValue.Buffer = AllocateCopyPool 
(Question->CurrentValue.BufferLen, StringPtr);
     gUserInput->InputValue.BufferLen = Question->CurrentValue.BufferLen;
     gUserInput->InputValue.Type = Question->CurrentValue.Type;
     gUserInput->InputValue.Value.string = HiiSetString(gFormData->HiiHandle, 
gUserInput->InputValue.Value.string, StringPtr, NULL);
     FreePool (StringPtr); 
+    FreePool (TempString);
 
     Status = EFI_SUCCESS;
 
     if (EFI_ERROR (Status)) {
       //
-- 
1.9.5.msysgit.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to