Index: ntoskrnl/io/pnpmgr/pnpmgr.c =================================================================== --- ntoskrnl/io/pnpmgr/pnpmgr.c (revision 73854) +++ ntoskrnl/io/pnpmgr/pnpmgr.c (working copy) @@ -978,9 +978,8 @@ NewList = ExAllocatePool(PagedPool, NewSize); if (!NewList) { - /* Fail */ - ExFreePool(PnpBusTypeGuidList); - goto Quickie; + /* Fail */ + goto Quickie; } /* Now copy them, decrease the size too */ @@ -1005,6 +1004,12 @@ Quickie: ExReleaseFastMutex(&PnpBusTypeGuidList->Lock); + + if (!NewList) { + /* Clean up */ + ExFreePool(PnpBusTypeGuidList); + } + return FoundIndex; }