X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdeModulePkg%2FCore%2FDxe%2FMem%2FPool.c;h=a435b9760c0e3e9dd812c7b75498efa4af2ad130;hp=2808905eabc594e0e7ed64943033f566ad4aa93e;hb=3e0587010e36d36d6374c8ca9956e9bfbc8da7a8;hpb=64c7a74917f653145a398f91749518960d09b918 diff --git a/MdeModulePkg/Core/Dxe/Mem/Pool.c b/MdeModulePkg/Core/Dxe/Mem/Pool.c index 2808905eab..a435b9760c 100644 --- a/MdeModulePkg/Core/Dxe/Mem/Pool.c +++ b/MdeModulePkg/Core/Dxe/Mem/Pool.c @@ -1,7 +1,7 @@ /** @file UEFI Memory pool management functions. -Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2012, 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 @@ -167,7 +167,7 @@ LookupPoolHead ( @param Buffer The address to return a pointer to the allocated pool - @retval EFI_INVALID_PARAMETER PoolType not valid + @retval EFI_INVALID_PARAMETER PoolType not valid or Buffer is NULL. @retval EFI_OUT_OF_RESOURCES Size exceeds max pool size or allocation failed. @retval EFI_SUCCESS Pool successfully allocated. @@ -190,6 +190,10 @@ CoreAllocatePool ( return EFI_INVALID_PARAMETER; } + if (Buffer == NULL) { + return EFI_INVALID_PARAMETER; + } + *Buffer = NULL; //