[NTOS:PNP] PiNotifyTargetDeviceChange: Don't free incorrect buffer

This commit is contained in:
Adam Słaboń 2024-03-03 00:17:39 +01:00 committed by Hermès BÉLUSCA - MAÏTO
parent 77af265315
commit 1d18b12ff7

View file

@ -315,6 +315,7 @@ PiNotifyTargetDeviceChange(
}
KeReleaseGuardedMutex(&PiNotifyTargetDeviceLock);
if (notificationStruct != CustomNotification)
ExFreePoolWithTag(notificationStruct, TAG_PNP_NOTIFY);
ObDereferenceObject(DeviceObject);
}