diff options
author | Ian Moffett <ian@osmora.org> | 2025-07-06 19:47:48 +0000 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-07-06 19:52:32 +0000 |
commit | 609712ec91fe5555bb87d4296f313073d6507760 (patch) | |
tree | fd24086c79d3d3dce48716f3f0dcf72dc1d784b2 | |
parent | 150d41bd67b2fba28f52ace478796d2c41802e12 (diff) |
kernel: tmpfs: Check NULL 'dirent', not 'res'
When going through each node in the tmpfs namespace, 'dirent' will be
NULL if nothing was found. This commit fixes a bad check where we were
using the wrong pointer.
Signed-off-by: Ian Moffett <ian@osmora.org>
-rw-r--r-- | sys/fs/tmpfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/fs/tmpfs.c b/sys/fs/tmpfs.c index 6ae1c38..c3f2fae 100644 --- a/sys/fs/tmpfs.c +++ b/sys/fs/tmpfs.c @@ -121,7 +121,7 @@ tmpfs_do_lookup(const char *rpath, struct tmpfs_node **res) } spinlock_release(&cnp->lock); - if (res == NULL) { + if (dirent == NULL) { return -ENOENT; } |