mirror of https://github.com/acidanthera/audk.git
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:
parent
4b0786b4fa
commit
4c7e997ef1
|
@ -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);
|
||||
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue