[CFL] Fix Klockwork scanning issues
This patch adds necessary check to avoid NULL pointer dereference Signed-off-by: Praveen HP <praveen.hodagatta.pranesh@intel.com>
This commit is contained in:
parent
99332b68dc
commit
f7c26922d3
|
@ -638,6 +638,9 @@ DEBUG_CODE_END();
|
|||
EarlyBootDeviceInit ();
|
||||
}
|
||||
PltDeviceTable = (PLT_DEVICE_TABLE *)AllocatePool (sizeof (PLT_DEVICE_TABLE) + sizeof (mPlatformDevices));
|
||||
if (PltDeviceTable == NULL) {
|
||||
return;
|
||||
}
|
||||
PltDeviceTable->DeviceNumber = sizeof (mPlatformDevices) /sizeof (PLT_DEVICE);
|
||||
CopyMem (PltDeviceTable->Device, mPlatformDevices, sizeof (mPlatformDevices));
|
||||
SetDeviceTable (PltDeviceTable);
|
||||
|
|
|
@ -1260,6 +1260,9 @@ UpdateFspConfig (
|
|||
FspsUpd->FspsConfig.TcoIrqSelect = 9;
|
||||
|
||||
HdaVerbTablePtr = (UINT32 *) AllocateZeroPool (6 * sizeof (UINT32)); // max 6 tables supported for now
|
||||
if (HdaVerbTablePtr == NULL) {
|
||||
return;
|
||||
}
|
||||
HdaVerbTableNum = 0;
|
||||
HdaVerbTablePtr[HdaVerbTableNum++] = (UINT32)(UINTN) &HdaVerbTableDisplayAudio;
|
||||
if (IsPchLp()) {
|
||||
|
|
Loading…
Reference in New Issue