Only warn when trying to free a NULL pointer with ExFreePoolWithTag

svn path=/trunk/; revision=39932
This commit is contained in:
Timo Kreuzer 2009-03-10 05:22:38 +00:00
parent 83b90e9547
commit 01213b0fed

View file

@ -296,6 +296,13 @@ ExFreePoolWithTag(
}
else
{
/* Warn only for NULL pointers */
if (Block == NULL)
{
DPRINT1("Warning: Trying to free a NULL pointer!\n");
return;
}
/* Block was not inside any pool! */
KeBugCheckEx(BAD_POOL_CALLER, 0x42, (ULONG_PTR)Block, 0, 0);
}