vfs: fix UAF in vfs_creat

Signed-off-by: Michael Shaw <m@michaelsshaw.com>
This commit is contained in:
Michael Shaw 2026-07-05 14:13:15 +02:00
commit 3b47b08a16

View file

@ -186,7 +186,7 @@ int vfs_creat(dirent_t *parent, const char *name, u64 mode, int flags, dirent_t
write_lock(&ino->rwlock);
dirent_t *test;
dirent_t *test = NULL;
res = inode_find_dirent(ino, name, &test);
if (res == 0) {