diff options
author | Matt Wu <matt@ext2fsd.com> | 2016-09-13 18:43:34 +0300 |
---|---|---|
committer | Matt Wu <matt@ext2fsd.com> | 2016-09-13 19:06:47 +0300 |
commit | d09519ee1cd3a1c4483eb43e8f587a70d604355d (patch) | |
tree | ed05c7b638a504e48da37620348b720b82aea11a /Ext3Fsd | |
parent | 39e5fbe3f938e1e04a334bb1dd2a0746441373cf (diff) |
FIXME: got NULL parent MCB when working with lfs
Diffstat (limited to 'Ext3Fsd')
-rwxr-xr-x | Ext3Fsd/fileinfo.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Ext3Fsd/fileinfo.c b/Ext3Fsd/fileinfo.c index 3039605..6c663a4 100755 --- a/Ext3Fsd/fileinfo.c +++ b/Ext3Fsd/fileinfo.c @@ -1936,12 +1936,14 @@ Ext2DeleteFile( ExAcquireResourceExclusiveLite(&Vcb->FcbLock, TRUE); bFcbLockAcquired = TRUE; - if (!(Dcb = Mcb->Parent->Fcb)) { - Dcb = Ext2AllocateFcb(Vcb, Mcb->Parent); + /* Mcb->Parent could be NULL when working with layered file systems */ + if (Mcb->Parent) { + Dcb = Mcb->Parent->Fcb; + if (!Dcb) + Dcb = Ext2AllocateFcb(Vcb, Mcb->Parent); } - if (Dcb) { + if (Dcb) Ext2ReferXcb(&Dcb->ReferenceCount); - } if (bFcbLockAcquired) { ExReleaseResourceLite(&Vcb->FcbLock); |