sys: FspFileNodeClose: ensure that cleanup also happens when Create fails

This commit is contained in:
Bill Zissimopoulos
2016-11-09 12:49:29 -08:00
parent a0cb134bd3
commit c10c7cc672
4 changed files with 33 additions and 7 deletions

View File

@ -74,7 +74,7 @@ static NTSTATUS FspFsvolClose(
Request->Req.Close.UserContext = FileNode->UserContext;
Request->Req.Close.UserContext2 = FileDesc->UserContext2;
FspFileNodeClose(FileNode, FileObject);
FspFileNodeClose(FileNode, FileObject, FALSE);
/* delete the FileDesc and deref the FileNode; order is important (FileDesc has FileNode ref) */
FspFileDescDelete(FileDesc); /* this will also close the MainFileObject if any */