Add NULL pointer check in I2chost.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Elvin Li <elvin.li@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15408 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Elvin Li 2014-03-28 02:34:31 +00:00 committed by li-elvin
parent 4b0786b4fa
commit 4c7e997ef1
1 changed files with 1 additions and 0 deletions

View File

@ -1012,6 +1012,7 @@ I2cHostQueueRequest (
//
RequestPacketSize = sizeof (UINTN) + RequestPacket->OperationCount * sizeof (EFI_I2C_OPERATION);
I2cRequest->RequestPacket = AllocateZeroPool (RequestPacketSize);
ASSERT (I2cRequest->RequestPacket != NULL);
CopyMem (I2cRequest->RequestPacket, RequestPacket, RequestPacketSize);
//