mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 01:39:30 +00:00
[NTFS]
Properly reset FCB & SectionObjectPointer fields from the FileObject on close svn path=/trunk/; revision=64691
This commit is contained in:
parent
64e2bc0bcd
commit
c440495495
1 changed files with 5 additions and 1 deletions
|
@ -42,12 +42,14 @@ NtfsCloseFile(PDEVICE_EXTENSION DeviceExt,
|
|||
PFILE_OBJECT FileObject)
|
||||
{
|
||||
PNTFS_CCB Ccb;
|
||||
PNTFS_FCB Fcb;
|
||||
|
||||
DPRINT("NtfsCloseFile(DeviceExt %p, FileObject %p)\n",
|
||||
DeviceExt,
|
||||
FileObject);
|
||||
|
||||
Ccb = (PNTFS_CCB)(FileObject->FsContext2);
|
||||
Fcb = (PNTFS_FCB)(FileObject->FsContext);
|
||||
|
||||
DPRINT("Ccb %p\n", Ccb);
|
||||
if (Ccb == NULL)
|
||||
|
@ -56,13 +58,15 @@ NtfsCloseFile(PDEVICE_EXTENSION DeviceExt,
|
|||
}
|
||||
|
||||
FileObject->FsContext2 = NULL;
|
||||
FileObject->FsContext = NULL;
|
||||
FileObject->SectionObjectPointer = NULL;
|
||||
|
||||
if (FileObject->FileName.Buffer)
|
||||
{
|
||||
// This a FO, that was created outside from FSD.
|
||||
// Some FO's are created with IoCreateStreamFileObject() insid from FSD.
|
||||
// This FO's don't have a FileName.
|
||||
NtfsReleaseFCB(DeviceExt, FileObject->FsContext);
|
||||
NtfsReleaseFCB(DeviceExt, Fcb);
|
||||
}
|
||||
|
||||
if (Ccb->DirectorySearchPattern)
|
||||
|
|
Loading…
Reference in a new issue