From 01213b0feddf0a71cf76f184f76d81092c156975 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Tue, 10 Mar 2009 05:22:38 +0000 Subject: [PATCH] Only warn when trying to free a NULL pointer with ExFreePoolWithTag svn path=/trunk/; revision=39932 --- reactos/ntoskrnl/mm/pool.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/reactos/ntoskrnl/mm/pool.c b/reactos/ntoskrnl/mm/pool.c index dbdccba8b98..d3a04071293 100644 --- a/reactos/ntoskrnl/mm/pool.c +++ b/reactos/ntoskrnl/mm/pool.c @@ -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); }