Permalink
Browse files

[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
  • Loading branch information...
SergeGautherie authored and HBelusca committed Feb 7, 2019
1 parent 0185ee4 commit 84e76b1c4c673f73968d0ce4c86b771c9cf519d4
Showing with 4 additions and 0 deletions.
  1. +4 −0 ntoskrnl/mm/ARM3/expool.c
@@ -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
}

//

0 comments on commit 84e76b1

Please sign in to comment.