Add code check to avoid access violation.
Signed-off-by: ydong10 Reviewed-by: rsun3 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13014 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -544,6 +544,7 @@ CoreDispatcher (
|
|||||||
&DriverEntry->ImageHandle,
|
&DriverEntry->ImageHandle,
|
||||||
sizeof (DriverEntry->ImageHandle)
|
sizeof (DriverEntry->ImageHandle)
|
||||||
);
|
);
|
||||||
|
ASSERT (DriverEntry->ImageHandle != NULL);
|
||||||
|
|
||||||
Status = CoreStartImage (DriverEntry->ImageHandle, NULL, NULL);
|
Status = CoreStartImage (DriverEntry->ImageHandle, NULL, NULL);
|
||||||
|
|
||||||
|
@ -640,6 +640,7 @@ CoreProcessFirmwareVolume (
|
|||||||
// somehow.
|
// somehow.
|
||||||
//
|
//
|
||||||
if (!EFI_ERROR(Status)) {
|
if (!EFI_ERROR(Status)) {
|
||||||
|
ASSERT (*FVProtocolHandle != NULL);
|
||||||
Ptr = NULL;
|
Ptr = NULL;
|
||||||
Status = CoreHandleProtocol (*FVProtocolHandle, &gEfiFirmwareVolume2ProtocolGuid, (VOID **) &Ptr);
|
Status = CoreHandleProtocol (*FVProtocolHandle, &gEfiFirmwareVolume2ProtocolGuid, (VOID **) &Ptr);
|
||||||
if (EFI_ERROR(Status) || (Ptr == NULL)) {
|
if (EFI_ERROR(Status) || (Ptr == NULL)) {
|
||||||
|
@ -403,6 +403,7 @@ IScsiReceiveLoginRsp (
|
|||||||
//
|
//
|
||||||
// A Login Response is received, process it.
|
// A Login Response is received, process it.
|
||||||
//
|
//
|
||||||
|
ASSERT (Pdu != NULL);
|
||||||
Status = IScsiProcessLoginRsp (Conn, Pdu);
|
Status = IScsiProcessLoginRsp (Conn, Pdu);
|
||||||
|
|
||||||
NetbufFree (Pdu);
|
NetbufFree (Pdu);
|
||||||
|
Reference in New Issue
Block a user