mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 04:13:34 +00:00
[KS]
Check parameters before using them and not after svn path=/trunk/; revision=58711
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user