From 29270756ea2123fb2a13191ea569458931fc756b Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Sat, 6 Aug 2016 08:57:47 +0000 Subject: [PATCH] [FASTFAT] Don't mess with parentless FCB. Dedicated to Thomas :-). CORE-11377 CORE-11426 svn path=/trunk/; revision=72126 --- reactos/drivers/filesystems/fastfat/fcb.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/reactos/drivers/filesystems/fastfat/fcb.c b/reactos/drivers/filesystems/fastfat/fcb.c index f8b0a48409e..3a63a34abb4 100644 --- a/reactos/drivers/filesystems/fastfat/fcb.c +++ b/reactos/drivers/filesystems/fastfat/fcb.c @@ -268,11 +268,15 @@ vfatDestroyFCB( PVFATFCB pFCB) { FsRtlUninitializeFileLock(&pFCB->FileLock); + if (!vfatFCBIsRoot(pFCB) && + !BooleanFlagOn(pFCB->Flags, FCB_IS_FAT) && !BooleanFlagOn(pFCB->Flags, FCB_IS_VOLUME)) + { + RemoveEntryList(&pFCB->ParentListEntry); + } ExFreePool(pFCB->PathNameBuffer); ExDeleteResourceLite(&pFCB->PagingIoResource); ExDeleteResourceLite(&pFCB->MainResource); ExFreeToNPagedLookasideList(&VfatGlobalData->FcbLookasideList, pFCB); - RemoveEntryList(&pFCB->ParentListEntry); ASSERT(IsListEmpty(&pFCB->ParentListHead)); }