mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 01:39:30 +00:00
[KS]
Check parameters before using them and not after svn path=/trunk/; revision=58711
This commit is contained in:
parent
3a1a8fa071
commit
84dd592090
1 changed files with 6 additions and 6 deletions
|
@ -421,18 +421,18 @@ KspDisableEvent(
|
|||
PKSEVENT_ENTRY EventEntry;
|
||||
PLIST_ENTRY Entry;
|
||||
|
||||
/* get current irp stack location */
|
||||
IoStack = IoGetCurrentIrpStackLocation(Ctx->Irp);
|
||||
|
||||
/* get event data */
|
||||
EventData = (PKSEVENTDATA)IoStack->Parameters.DeviceIoControl.Type3InputBuffer;
|
||||
|
||||
if (!Ctx || !Ctx->List || !Ctx->FileObject || !Ctx->Irp)
|
||||
{
|
||||
/* invalid parameter */
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* get current irp stack location */
|
||||
IoStack = IoGetCurrentIrpStackLocation(Ctx->Irp);
|
||||
|
||||
/* get event data */
|
||||
EventData = (PKSEVENTDATA)IoStack->Parameters.DeviceIoControl.Type3InputBuffer;
|
||||
|
||||
/* point to first entry */
|
||||
Entry = Ctx->List->Flink;
|
||||
|
||||
|
|
Loading…
Reference in a new issue