[NTOSKRNL]

Assert that the allocated buffers are not leaked.

CID #1248416

svn path=/trunk/; revision=71937
This commit is contained in:
Pierre Schweitzer 2016-07-14 12:21:57 +00:00
parent aeaced7e5a
commit e7bb031141

View file

@ -134,6 +134,8 @@ FsRtlIsNameInExpressionPrivate(IN PUNICODE_STRING Expression,
StarFound++;
if (StarFound >= BackTrackingSize)
{
ASSERT(BackTracking == BackTrackingBuffer);
BackTrackingSize = Expression->Length / sizeof(WCHAR);
BackTracking = ExAllocatePoolWithTag(PagedPool | POOL_RAISE_IF_ALLOCATION_FAILURE,
BackTrackingSize * sizeof(USHORT),
@ -190,6 +192,8 @@ FsRtlIsNameInExpressionPrivate(IN PUNICODE_STRING Expression,
DosStarFound++;
if (DosStarFound >= DosBackTrackingSize)
{
ASSERT(DosBackTracking == DosBackTrackingBuffer);
DosBackTrackingSize = Expression->Length / sizeof(WCHAR);
DosBackTracking = ExAllocatePoolWithTag(PagedPool | POOL_RAISE_IF_ALLOCATION_FAILURE,
DosBackTrackingSize * sizeof(USHORT),