mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 08:25:03 +00:00
[KMTEST] Add a NULL check
This commit is contained in:
parent
9e12af569f
commit
52fe43e87b
1 changed files with 6 additions and 0 deletions
|
@ -459,6 +459,11 @@ TestIrpHandler(
|
|||
ok(Irp->AssociatedIrp.SystemBuffer == NULL, "A SystemBuffer was allocated!\n");
|
||||
OrigBuffer = Buffer = MapAndLockUserBuffer(Irp, Length);
|
||||
ok(Buffer != NULL, "Null pointer!\n");
|
||||
if (Buffer == NULL)
|
||||
{
|
||||
Status = STATUS_UNSUCCESSFUL;
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
if (Offset.QuadPart < Fcb->Header.FileSize.QuadPart)
|
||||
{
|
||||
|
@ -545,6 +550,7 @@ TestIrpHandler(
|
|||
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
||||
}
|
||||
|
||||
Exit:
|
||||
FsRtlExitFileSystem();
|
||||
|
||||
return Status;
|
||||
|
|
Loading…
Reference in a new issue