summaryrefslogtreecommitdiff
path: root/MdeModulePkg
diff options
context:
space:
mode:
authorhhuan13 <hhuan13@6f19259b-4bc3-4df7-8a09-765794883524>2010-03-04 01:48:52 +0000
committerhhuan13 <hhuan13@6f19259b-4bc3-4df7-8a09-765794883524>2010-03-04 01:48:52 +0000
commit1fc17d768f44860bebeba03bf2e996c20c9dd08d (patch)
tree5f63461963b164c4765a59d62251bc49b61a7660 /MdeModulePkg
parent1b14ec40bbdb3895001b556a90feb93defd3c7f2 (diff)
downloadedk2-platforms-1fc17d768f44860bebeba03bf2e996c20c9dd08d.tar.xz
Remove Size==0 branch in SmmAllocatePool()
The background is : The SmmMemoryAllocationLib of one of the instance of MemoryAllocation library class. As in MdePkg comment for AllocatePool() : “If AllocationSize is 0, then a valid buffer of 0 size is returned.”,the SMM library implements AllocatePool by SMST service SmmAllocatePool which does NOT support the zero size. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10171 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Core/PiSmmCore/Pool.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/MdeModulePkg/Core/PiSmmCore/Pool.c b/MdeModulePkg/Core/PiSmmCore/Pool.c
index 10a85c47ab..b38a3e0b7e 100644
--- a/MdeModulePkg/Core/PiSmmCore/Pool.c
+++ b/MdeModulePkg/Core/PiSmmCore/Pool.c
@@ -224,11 +224,6 @@ SmmAllocatePool (
return EFI_INVALID_PARAMETER;
}
- if (Size == 0) {
- *Buffer = NULL;
- return EFI_SUCCESS;
- }
-
Size += sizeof (*PoolHdr);
if (Size > MAX_POOL_SIZE) {
Size = EFI_SIZE_TO_PAGES (Size);