open: fix possible use of unitialized variable

This commit is contained in:
Matheus
2026-04-16 18:35:39 -03:00
parent 96c8f96e7b
commit 452c95c577
+3
View File
@@ -20,6 +20,9 @@ syscallret_t syscall_openat(context_t *context, int dirfd, char *path, int flags
size_t pathsize;
ret.errno = usercopy_strlen(path, &pathsize);
if (ret.errno)
return ret;
char *pathbuf = alloc(pathsize + 1);
if (pathbuf == NULL) {
ret.errno = ENOMEM;