[NTOS]: Fix kernel memory corruption when dequeuing a PnP event
authorCameron Gutman <aicommander@gmail.com>
Mon, 2 Aug 2010 21:22:34 +0000 (21:22 +0000)
committerCameron Gutman <aicommander@gmail.com>
Mon, 2 Aug 2010 21:22:34 +0000 (21:22 +0000)
svn path=/trunk/; revision=48422

reactos/ntoskrnl/io/pnpmgr/plugplay.c

index 492d4a1..4a2259e 100644 (file)
@@ -98,7 +98,7 @@ IopRemovePlugPlayEvent(VOID)
     /* Remove a pnp event entry from the tail of the queue */
     if (!IsListEmpty(&IopPnpEventQueueHead))
     {
-        ExFreePool(RemoveTailList(&IopPnpEventQueueHead));
+        ExFreePool(CONTAINING_RECORD(RemoveTailList(&IopPnpEventQueueHead), PNP_EVENT_ENTRY, ListEntry)));
     }
 
     /* Signal the next pnp event in the queue */