vfs: fix UAF in vfs_creat
Signed-off-by: Michael Shaw <m@michaelsshaw.com>
This commit is contained in:
parent
26a5953fde
commit
3b47b08a16
1 changed files with 1 additions and 1 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue