diff --git a/ntoskrnl/io/pnpmgr/pnpnotify.c b/ntoskrnl/io/pnpmgr/pnpnotify.c index cc169aba171..35a503bfe2d 100644 --- a/ntoskrnl/io/pnpmgr/pnpnotify.c +++ b/ntoskrnl/io/pnpmgr/pnpnotify.c @@ -315,7 +315,8 @@ PiNotifyTargetDeviceChange( } KeReleaseGuardedMutex(&PiNotifyTargetDeviceLock); - ExFreePoolWithTag(notificationStruct, TAG_PNP_NOTIFY); + if (notificationStruct != CustomNotification) + ExFreePoolWithTag(notificationStruct, TAG_PNP_NOTIFY); ObDereferenceObject(DeviceObject); }