Hello!
When I unload my driver with verifier enabled, I got a memory leak BSOD.
Windbg indicates 10 bytes of memory with pool tag VfUs has not been properly
freed during the unload.
PoolAddress SizeInBytes Tag CallersAddress
b2710ff0 0x00000010 VfUs ac1abfce
the address of “ac1abfce” points to my source code:
IoSetCompletionRoutineEx(DeviceObject,
Irp,(PIO_COMPLETION_ROUTINE)CompletionRoutines, Event, TRUE, TRUE, TRUE);
KeClearEvent(Event);
ntStatus = IoCallDriver(NextStackDevice, Irp);
if (STATUS_PENDING == ntStatus)
{
ntStatus = KeWaitForSingleObject(Event, Executive, KernelMode,
FALSE, NULL);
}
Does this means that the driver is unload before the CompletionRoutines has
been executed?
How can I fix this? thanks.
–
Danny