diff options
author | Ard Biesheuvel <ard.biesheuvel@arm.com> | 2021-01-06 11:26:34 +0100 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2021-01-08 13:37:57 +0000 |
commit | 18198171559160386067f5ebe0d671d61ffd0679 (patch) | |
tree | 4aad66dbcd423b864d755c5a1d75df2ee5646479 /EmbeddedPkg | |
parent | 7e6776deaf87e73fb283ab6ea6fb08ef3a097bcf (diff) | |
download | edk2-18198171559160386067f5ebe0d671d61ffd0679.tar.gz |
EmbeddedPkg/PrePiMemoryAllocationLib: use correct size for pool hob
Use the correct type in the sizeof() expression to calculate the size
of the newly allocated EFI_HOB_MEMORY_POOL hob.
Link: https://bugzilla.tianocore.org/show_bug.cgi?id=3139
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
Reviewed-by: Leif Lindholm <leif@nuviainc.com>
Diffstat (limited to 'EmbeddedPkg')
-rw-r--r-- | EmbeddedPkg/Library/PrePiMemoryAllocationLib/MemoryAllocationLib.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/EmbeddedPkg/Library/PrePiMemoryAllocationLib/MemoryAllocationLib.c b/EmbeddedPkg/Library/PrePiMemoryAllocationLib/MemoryAllocationLib.c index 6d233acb98..bae6682c72 100644 --- a/EmbeddedPkg/Library/PrePiMemoryAllocationLib/MemoryAllocationLib.c +++ b/EmbeddedPkg/Library/PrePiMemoryAllocationLib/MemoryAllocationLib.c @@ -184,7 +184,9 @@ AllocatePool ( return 0;
} else {
- Hob = (EFI_HOB_MEMORY_POOL *)CreateHob (EFI_HOB_TYPE_MEMORY_POOL, (UINT16)(sizeof (EFI_HOB_TYPE_MEMORY_POOL) + AllocationSize));
+ Hob = (EFI_HOB_MEMORY_POOL *)CreateHob (EFI_HOB_TYPE_MEMORY_POOL,
+ (UINT16)(sizeof (EFI_HOB_MEMORY_POOL) +
+ AllocationSize));
return (VOID *)(Hob + 1);
}
}
|