From f52b89d43133e4f2c9b7656221382116d7ebdf8a Mon Sep 17 00:00:00 2001 From: Will Sowerbutts Date: Fri, 23 Jan 2015 23:26:41 +0000 Subject: [PATCH] Kernel: Bug fix: _mknod() always failed --- Kernel/syscall_fs2.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Kernel/syscall_fs2.c b/Kernel/syscall_fs2.c index 872b608e..379dd726 100644 --- a/Kernel/syscall_fs2.c +++ b/Kernel/syscall_fs2.c @@ -108,7 +108,8 @@ int16_t _mknod(void) } filename(name, fname); - if ((ino = newfile(parent, fname)) != NULL) + ino = newfile(parent, fname); + if(!ino) goto nogood3; /* parent inode is derefed in newfile. SN */ /* Initialize mode and dev */ @@ -762,4 +763,4 @@ done: #undef file -#undef lockop \ No newline at end of file +#undef lockop -- 2.34.1