open: fix use of possibly null variable

This commit is contained in:
Matheus
2024-09-20 18:58:29 -03:00
parent dce1edad26
commit 3868b667cb
+2
View File
@@ -62,8 +62,10 @@ syscallret_t syscall_openat(context_t *context, int dirfd, char *path, int flags
ret.errno = vfs_create(dirnode, pathbuf, &attr, V_TYPE_REGULAR, &vnode);
if (ret.errno == EEXIST && (flags & O_EXCL) == 0)
goto retry_open;
else if (ret.errno == 0) {
VOP_UNLOCK(vnode);
}
}
if (ret.errno)
goto cleanup;