Synchronize with trunk revision 59636 (just before Alex's CreateProcess revamp).
[reactos.git] / drivers / ksfilter / ks / event.c
index 5ec2e85..460f995 100644 (file)
@@ -292,7 +292,7 @@ KspEnableEvent(
     else
     {
         /* allocate it from nonpaged pool */
-        EventEntry = ExAllocatePool(NonPagedPool, Size);
+        EventEntry = AllocateItem(NonPagedPool, Size);
     }
 
     if (!EventEntry)
@@ -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;
 
@@ -529,7 +529,7 @@ KsDiscardEvent(
     }
 
     /* free event entry */
-    ExFreePool(EventEntry);
+    FreeItem(EventEntry);
 }