Author: pschweitzer
Date: Thu Jul 14 12:21:57 2016
New Revision: 71937
URL:
http://svn.reactos.org/svn/reactos?rev=71937&view=rev
Log:
[NTOSKRNL]
Assert that the allocated buffers are not leaked.
CID #1248416
Modified:
trunk/reactos/ntoskrnl/fsrtl/name.c
Modified: trunk/reactos/ntoskrnl/fsrtl/name.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/fsrtl/name.c?rev=…
==============================================================================
--- trunk/reactos/ntoskrnl/fsrtl/name.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/fsrtl/name.c [iso-8859-1] Thu Jul 14 12:21:57 2016
@@ -134,6 +134,8 @@
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 @@
DosStarFound++;
if (DosStarFound >= DosBackTrackingSize)
{
+ ASSERT(DosBackTracking == DosBackTrackingBuffer);
+
DosBackTrackingSize = Expression->Length / sizeof(WCHAR);
DosBackTracking = ExAllocatePoolWithTag(PagedPool |
POOL_RAISE_IF_ALLOCATION_FAILURE,
DosBackTrackingSize *
sizeof(USHORT),