@param Buffer The address to return a pointer to the allocated\r
pool\r
\r
- @retval EFI_INVALID_PARAMETER PoolType not valid\r
+ @retval EFI_INVALID_PARAMETER PoolType not valid or Buffer is NULL\r
@retval EFI_OUT_OF_RESOURCES Size exceeds max pool size or allocation failed.\r
@retval EFI_SUCCESS Pool successfully allocated.\r
\r
/** @file\r
UEFI Memory page management functions.\r
\r
-Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2007 - 2012, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
+ if (Memory == NULL) {\r
+ return EFI_INVALID_PARAMETER;\r
+ }\r
+\r
Alignment = EFI_DEFAULT_PAGE_ALLOCATION_ALIGNMENT;\r
\r
if (MemoryType == EfiACPIReclaimMemory ||\r
/** @file\r
UEFI Memory pool management functions.\r
\r
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
@param Buffer The address to return a pointer to the allocated\r
pool\r
\r
- @retval EFI_INVALID_PARAMETER PoolType not valid\r
+ @retval EFI_INVALID_PARAMETER PoolType not valid or Buffer is NULL. \r
@retval EFI_OUT_OF_RESOURCES Size exceeds max pool size or allocation failed.\r
@retval EFI_SUCCESS Pool successfully allocated.\r
\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
+ if (Buffer == NULL) {\r
+ return EFI_INVALID_PARAMETER;\r
+ }\r
+\r
*Buffer = NULL;\r
\r
//\r
If a code construct is defined in the UEFI 2.3 specification it must be included\r
by this include file.\r
\r
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials are licensed and made available under \r
the terms and conditions of the BSD License that accompanies this distribution. \r
The full text of the license may be found at\r
@retval EFI_INVALID_PARAMETER 1) Type is not AllocateAnyPages or\r
AllocateMaxAddress or AllocateAddress.\r
2) MemoryType is in the range\r
+ 3) Memory is NULL.\r
EfiMaxMemoryType..0x7FFFFFFF.\r
@retval EFI_OUT_OF_RESOURCES The pages could not be allocated.\r
@retval EFI_NOT_FOUND The requested pages could not be found.\r
\r
@retval EFI_SUCCESS The requested number of bytes was allocated.\r
@retval EFI_OUT_OF_RESOURCES The pool requested could not be allocated.\r
- @retval EFI_INVALID_PARAMETER PoolType was invalid.\r
+ @retval EFI_INVALID_PARAMETER PoolType was invalid or Buffer is NULL.\r
\r
**/\r
typedef\r