Hi All,
My virtual stor miniport driver is allocating memory by using following function :
void allocatemem(size)
{
buf = ExAllocatePoolWithTag(NonPagedPool,size, 0x30303030);
if (buf) {
atomic_inc(&alloc_count);
RtlZeroMemory(buf, size);
}
return buf;
}
and freeing it by using :
void kfree(void *addr)
{
ExFreePool((PVOID)addr, 0x30303030); //Got Driver verfier BSOD here…
atomic_dec(&alloc_count);
}
when i run it with driver verifier with the “special pool tracking” ,“pool tracking” “force IRQL checking” "DMA verification options ,got a bugcheck 0xC4 with the sub code 0x13A saying that “ExFreePool” is the faulty code statement.Can any one please help me to find the potential reasons for this.
Thanks in advance,