From 609712ec91fe5555bb87d4296f313073d6507760 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Sun, 6 Jul 2025 19:47:48 +0000 Subject: 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 --- sys/fs/tmpfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- cgit v1.2.3