Author: pschweitzer Date: Sun Oct 26 15:56:20 2014 New Revision: 65014
URL: http://svn.reactos.org/svn/reactos?rev=65014&view=rev Log: [FASTFAT] Make FATGetNextDirEntry() and vfatFindDirSpace() complain when they are given a cleaned up FCB (which shouldn't happen!). They'll display full path, references count, open handles count.
Where are you little reference leak?
Modified: trunk/reactos/drivers/filesystems/fastfat/direntry.c trunk/reactos/drivers/filesystems/fastfat/dirwr.c
Modified: trunk/reactos/drivers/filesystems/fastfat/direntry.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfat... ============================================================================== --- trunk/reactos/drivers/filesystems/fastfat/direntry.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/fastfat/direntry.c [iso-8859-1] Sun Oct 26 15:56:20 2014 @@ -201,6 +201,12 @@ CcUnpinData(*pContext); }
+ if (!pDirFcb->FileObject) + { + DPRINT1("Buggy FCB (cleaned up)! %S (%d / %u)\n", pDirFcb->PathNameBuffer, pDirFcb->RefCount, pDirFcb->OpenHandleCount); + return STATUS_NO_MORE_ENTRIES; + } + if (FileOffset.u.LowPart >= pDirFcb->RFCB.FileSize.u.LowPart || !CcMapData(pDirFcb->FileObject, &FileOffset, PAGE_SIZE, TRUE, pContext, pPage)) {
Modified: trunk/reactos/drivers/filesystems/fastfat/dirwr.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfat... ============================================================================== --- trunk/reactos/drivers/filesystems/fastfat/dirwr.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/fastfat/dirwr.c [iso-8859-1] Sun Oct 26 15:56:20 2014 @@ -166,6 +166,11 @@ if (Context) { CcUnpinData(Context); + } + if (!pDirFcb->FileObject) + { + DPRINT1("Buggy FCB (cleaned up)! %S (%d / %u)\n", pDirFcb->PathNameBuffer, pDirFcb->RefCount, pDirFcb->OpenHandleCount); + return FALSE; } if (!CcPinRead(pDirFcb->FileObject, &FileOffset, DeviceExt->FatInfo.BytesPerCluster, TRUE, &Context, (PVOID*)&pFatEntry))