]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg/DisplayEngine: Fix memory leak issues in DisplayEngine
authorDandan Bi <dandan.bi@intel.com>
Thu, 19 May 2016 06:17:34 +0000 (14:17 +0800)
committerStar Zeng <star.zeng@intel.com>
Wed, 25 May 2016 08:31:37 +0000 (16:31 +0800)
The following codes are useless and cause memory leak issues.
So now remove them.

Cc: Cecil Sheng <cecil.sheng@hpe.com>
Cc: Qiu Shumin <shumin.qiu@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
MdeModulePkg/Universal/DisplayEngineDxe/InputHandler.c
MdeModulePkg/Universal/DisplayEngineDxe/ProcessOptions.c

index 732dd2f3de7a070413a8e7a0d98201f0f361e48d..8e7b735c70635a14b27ed92e69c4d569a0b1b750 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 Implementation for handling user input from the User Interfaces.\r
 \r
-Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -1299,9 +1299,6 @@ GetSelectionInputPopUp (
   ShowDownArrow     = FALSE;\r
   ShowUpArrow       = FALSE;\r
 \r
-  StringPtr = AllocateZeroPool ((gOptionBlockWidth + 1) * 2);\r
-  ASSERT (StringPtr);\r
-\r
   ZeroMem (&HiiValue, sizeof (EFI_HII_VALUE));\r
 \r
   Question = MenuOption->ThisTag;\r
index bb2faf3244d491608544d2b95db04f58c403348e..c61a3950a8fe3e58a5d3dede1521e05283f46c40 100644 (file)
@@ -2,7 +2,7 @@
 Implementation for handling the User Interface option processing.\r
 \r
 \r
-Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -885,18 +885,8 @@ PasswordProcess (
     gUserInput->InputValue.BufferLen = Question->CurrentValue.BufferLen;\r
     gUserInput->InputValue.Type = Question->CurrentValue.Type;\r
     gUserInput->InputValue.Value.string = HiiSetString(gFormData->HiiHandle, gUserInput->InputValue.Value.string, StringPtr, NULL);\r
-    FreePool (StringPtr); \r
 \r
     Status = EFI_SUCCESS;\r
-\r
-    if (EFI_ERROR (Status)) {\r
-      //\r
-      // Reset state machine for password\r
-      //\r
-      Question->PasswordCheck (gFormData, Question, NULL);\r
-    }\r
-\r
-    return Status;\r
   } else {\r
     //\r
     // Reset state machine for password\r