* [Patch] MdeModulePkg HiiDatabase: Remove extra memory initialization.
@ 2016-11-15 2:28 Eric Dong
2016-11-17 6:34 ` Gao, Liming
0 siblings, 1 reply; 2+ messages in thread
From: Eric Dong @ 2016-11-15 2:28 UTC (permalink / raw)
To: edk2-devel; +Cc: Liming Gao, Dandan Bi
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 <liming.gao@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Patch] MdeModulePkg HiiDatabase: Remove extra memory initialization.
2016-11-15 2:28 [Patch] MdeModulePkg HiiDatabase: Remove extra memory initialization Eric Dong
@ 2016-11-17 6:34 ` Gao, Liming
0 siblings, 0 replies; 2+ messages in thread
From: Gao, Liming @ 2016-11-17 6:34 UTC (permalink / raw)
To: Dong, Eric, edk2-devel@lists.01.org; +Cc: Bi, Dandan
Reviewed-by: Liming Gao <liming.gao@intel.com>
> -----Original Message-----
> From: Dong, Eric
> Sent: Tuesday, November 15, 2016 10:29 AM
> To: edk2-devel@lists.01.org
> Cc: Gao, Liming <liming.gao@intel.com>; Bi, Dandan <dandan.bi@intel.com>
> Subject: [Patch] MdeModulePkg HiiDatabase: Remove extra memory
> initialization.
>
> 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 <liming.gao@intel.com>
> Cc: Dandan Bi <dandan.bi@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Eric Dong <eric.dong@intel.com>
> ---
> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-11-17 6:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-15 2:28 [Patch] MdeModulePkg HiiDatabase: Remove extra memory initialization Eric Dong
2016-11-17 6:34 ` Gao, Liming
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox