diff options
author | Elvin Li <elvin.li@intel.com> | 2014-03-28 02:34:31 +0000 |
---|---|---|
committer | li-elvin <li-elvin@6f19259b-4bc3-4df7-8a09-765794883524> | 2014-03-28 02:34:31 +0000 |
commit | 4c7e997ef1c81be69e6b4a8e2fa8cec013ee0d5f (patch) | |
tree | 393d660d2fc301bf2b34c352781dec6d72d7f32c /MdeModulePkg/Bus/I2c | |
parent | 4b0786b4fa46f89287293b514afd1ef5d4c24d07 (diff) | |
download | edk2-platforms-4c7e997ef1c81be69e6b4a8e2fa8cec013ee0d5f.tar.xz |
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
Diffstat (limited to 'MdeModulePkg/Bus/I2c')
-rw-r--r-- | MdeModulePkg/Bus/I2c/I2cDxe/I2cHost.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/MdeModulePkg/Bus/I2c/I2cDxe/I2cHost.c b/MdeModulePkg/Bus/I2c/I2cDxe/I2cHost.c index 0cc8e33842..ff99fe4461 100644 --- a/MdeModulePkg/Bus/I2c/I2cDxe/I2cHost.c +++ b/MdeModulePkg/Bus/I2c/I2cDxe/I2cHost.c @@ -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);
//
|