[NTOS:MM] ExFreePoolWithTag(): Accept tag mismatch, on release build only (#1334)

"Release" builds should not BSoD on 'Freeing pool - invalid tag specified' case,
this is compatible with Windows behaviour.
Nothing changes otherwise concerning the "Debug" builds, where pool-tag mismatch
triggers a BSoD as expected.

CORE-15446
This commit is contained in:
Serge Gautherie 2019-02-07 16:57:56 +01:00 committed by Hermès BÉLUSCA - MAÏTO
parent 0185ee46d5
commit 84e76b1c4c

View file

@ -2558,7 +2558,9 @@ ExFreePoolWithTag(IN PVOID P,
if (TagToFree && TagToFree != Tag)
{
DPRINT1("Freeing pool - invalid tag specified: %.4s != %.4s\n", (char*)&TagToFree, (char*)&Tag);
#if DBG
KeBugCheckEx(BAD_POOL_CALLER, 0x0A, (ULONG_PTR)P, Tag, TagToFree);
#endif
}
//
@ -2640,7 +2642,9 @@ ExFreePoolWithTag(IN PVOID P,
if (TagToFree && TagToFree != Tag)
{
DPRINT1("Freeing pool - invalid tag specified: %.4s != %.4s\n", (char*)&TagToFree, (char*)&Tag);
#if DBG
KeBugCheckEx(BAD_POOL_CALLER, 0x0A, (ULONG_PTR)P, Tag, TagToFree);
#endif
}
//