diff --git a/reactos/ntoskrnl/io/pnpmgr/plugplay.c b/reactos/ntoskrnl/io/pnpmgr/plugplay.c index 492d4a14683..4a2259e6e85 100644 --- a/reactos/ntoskrnl/io/pnpmgr/plugplay.c +++ b/reactos/ntoskrnl/io/pnpmgr/plugplay.c @@ -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 */