X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=KernelLand%2FKernel%2Fvfs%2Fdir.c;h=add48b0cfadd84ea25dacc058a84f8317ee3092b;hb=3a9ef7ac5cfc8cb086efee3aa01df781ba54aa30;hp=241753974a7df0ab8a8fbcd02fc5ed030e62a9ec;hpb=00ff4fddc81bf6567a7c6de0685a579c245e0928;p=tpg%2Facess2.git diff --git a/KernelLand/Kernel/vfs/dir.c b/KernelLand/Kernel/vfs/dir.c index 24175397..add48b0c 100644 --- a/KernelLand/Kernel/vfs/dir.c +++ b/KernelLand/Kernel/vfs/dir.c @@ -104,9 +104,11 @@ int VFS_MkNod(const char *Path, Uint Flags) return ret==NULL; _error: - _CloseNode(parent); - ASSERT(mountpt->OpenHandleCount>0); - mountpt->OpenHandleCount --; + if( parent ) { + _CloseNode(parent); + ASSERT(mountpt->OpenHandleCount>0); + mountpt->OpenHandleCount --; + } free(absPath); LEAVE('i', -1); return -1;