From 4b7345a7dd71bdc99a824facf55066838ec240da Mon Sep 17 00:00:00 2001 From: Dandan Bi Date: Thu, 19 May 2016 14:17:34 +0800 Subject: MdeModulePkg/DisplayEngine: Fix memory leak issues in DisplayEngine The following codes are useless and cause memory leak issues. So now remove them. Cc: Cecil Sheng Cc: Qiu Shumin Cc: Eric Dong Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi Reviewed-by: Eric Dong --- MdeModulePkg/Universal/DisplayEngineDxe/InputHandler.c | 5 +---- MdeModulePkg/Universal/DisplayEngineDxe/ProcessOptions.c | 12 +----------- 2 files changed, 2 insertions(+), 15 deletions(-) (limited to 'MdeModulePkg') diff --git a/MdeModulePkg/Universal/DisplayEngineDxe/InputHandler.c b/MdeModulePkg/Universal/DisplayEngineDxe/InputHandler.c index 732dd2f3de..8e7b735c70 100644 --- a/MdeModulePkg/Universal/DisplayEngineDxe/InputHandler.c +++ b/MdeModulePkg/Universal/DisplayEngineDxe/InputHandler.c @@ -1,7 +1,7 @@ /** @file Implementation for handling user input from the User Interfaces. -Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.
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 @@ -1299,9 +1299,6 @@ GetSelectionInputPopUp ( ShowDownArrow = FALSE; ShowUpArrow = FALSE; - StringPtr = AllocateZeroPool ((gOptionBlockWidth + 1) * 2); - ASSERT (StringPtr); - ZeroMem (&HiiValue, sizeof (EFI_HII_VALUE)); Question = MenuOption->ThisTag; diff --git a/MdeModulePkg/Universal/DisplayEngineDxe/ProcessOptions.c b/MdeModulePkg/Universal/DisplayEngineDxe/ProcessOptions.c index bb2faf3244..c61a3950a8 100644 --- a/MdeModulePkg/Universal/DisplayEngineDxe/ProcessOptions.c +++ b/MdeModulePkg/Universal/DisplayEngineDxe/ProcessOptions.c @@ -2,7 +2,7 @@ Implementation for handling the User Interface option processing. -Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.
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 @@ -885,18 +885,8 @@ PasswordProcess ( 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); Status = EFI_SUCCESS; - - if (EFI_ERROR (Status)) { - // - // Reset state machine for password - // - Question->PasswordCheck (gFormData, Question, NULL); - } - - return Status; } else { // // Reset state machine for password -- cgit v1.2.3