From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 9E48481E63 for ; Mon, 14 Nov 2016 18:28:44 -0800 (PST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP; 14 Nov 2016 18:28:49 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,640,1473145200"; d="scan'208";a="901426800" Received: from shwde7156.ccr.corp.intel.com ([10.239.158.52]) by orsmga003.jf.intel.com with ESMTP; 14 Nov 2016 18:28:47 -0800 From: Eric Dong To: edk2-devel@lists.01.org Cc: Liming Gao , Dandan Bi Date: Tue, 15 Nov 2016 10:28:46 +0800 Message-Id: <1479176926-24656-1-git-send-email-eric.dong@intel.com> X-Mailer: git-send-email 2.6.4.windows.1 Subject: [Patch] MdeModulePkg HiiDatabase: Remove extra memory initialization. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Nov 2016 02:28:44 -0000 The memory will be set to background color after success allocate the data, so not need to call AllocateZeroPool. Related bugz: https://bugzilla.tianocore.org/show_bug.cgi?id=223 Cc: Liming Gao Cc: Dandan Bi Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong --- MdeModulePkg/Universal/HiiDatabaseDxe/Font.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/Font.c b/MdeModulePkg/Universal/HiiDatabaseDxe/Font.c index 7855c7e..9bef064 100644 --- a/MdeModulePkg/Universal/HiiDatabaseDxe/Font.c +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/Font.c @@ -2056,7 +2056,7 @@ HiiStringToImage ( if ((Flags & EFI_HII_DIRECT_TO_SCREEN) == EFI_HII_DIRECT_TO_SCREEN) { BltBuffer = NULL; if (RowInfo[RowIndex].LineWidth != 0) { - BltBuffer = AllocateZeroPool (RowInfo[RowIndex].LineWidth * RowInfo[RowIndex].LineHeight * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)); + BltBuffer = AllocatePool (RowInfo[RowIndex].LineWidth * RowInfo[RowIndex].LineHeight * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)); if (BltBuffer == NULL) { Status = EFI_OUT_OF_RESOURCES; goto Exit; -- 2.6.4.windows.1