diff --git a/Kernel/Syscalls/mount.cpp b/Kernel/Syscalls/mount.cpp index 917d6968b4..237bb48a01 100644 --- a/Kernel/Syscalls/mount.cpp +++ b/Kernel/Syscalls/mount.cpp @@ -95,6 +95,9 @@ KResultOr Process::sys$mount(Userspace use return ENODEV; } + if (!fs) + return ENOMEM; + if (!fs->initialize()) { dbgln("mount: failed to initialize {} filesystem, fd={}", fs_type, source_fd); return ENODEV;