Author: tkreuzer
Date: Tue Mar 10 08:22:38 2009
New Revision: 39932
URL:
http://svn.reactos.org/svn/reactos?rev=39932&view=rev
Log:
Only warn when trying to free a NULL pointer with ExFreePoolWithTag
Modified:
trunk/reactos/ntoskrnl/mm/pool.c
Modified: trunk/reactos/ntoskrnl/mm/pool.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/pool.c?rev=399…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/pool.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/pool.c [iso-8859-1] Tue Mar 10 08:22:38 2009
@@ -296,6 +296,13 @@
}
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);
}