}
// Permissions Check
- if( !VFS_CheckACL(parent, VFS_PERM_EXECUTE|VFS_PERM_WRITE) ) {
+ if( !VFS_CheckACL(parent, VFS_PERM_EXEC|VFS_PERM_WRITE) ) {
errno = EACCES;
goto _error;
}
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;