From: John Hodge (sonata) Date: Sun, 11 Nov 2012 03:51:00 +0000 (+0800) Subject: Kernel - Minor changes to SysSpawn X-Git-Tag: rel0.15~663 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=772bccbd2253d1d107eda59e0df6d277b4435558;p=tpg%2Facess2.git Kernel - Minor changes to SysSpawn --- diff --git a/KernelLand/Kernel/binary.c b/KernelLand/Kernel/binary.c index 92baa737..a15db0bf 100644 --- a/KernelLand/Kernel/binary.c +++ b/KernelLand/Kernel/binary.c @@ -197,6 +197,7 @@ int Proc_SysSpawn(const char *Binary, const char **ArgV, const char **EnvP, int if( ret < 0 ) { VFS_FreeSavedHandles(nFD, handles); + free(cachebuf); } return ret; diff --git a/KernelLand/Kernel/syscalls.c b/KernelLand/Kernel/syscalls.c index 99c79424..5a1d5967 100644 --- a/KernelLand/Kernel/syscalls.c +++ b/KernelLand/Kernel/syscalls.c @@ -166,7 +166,7 @@ void SyscallHandler(tSyscallRegs *Regs) CHECK_STR_NONULL((const char*)Regs->Arg1); CHECK_STR_ARRAY((const char**)Regs->Arg2); CHECK_STR_ARRAY((const char**)Regs->Arg3); - CHECK_NUM_NONULL((void*)Regs->Arg5, Regs->Arg4*sizeof(int)); + CHECK_NUM_NULLOK((void*)Regs->Arg5, Regs->Arg4*sizeof(int)); ret = Proc_SysSpawn( (const char*)Regs->Arg1, (const char**)Regs->Arg2, (const char**)Regs->Arg3, Regs->Arg4, (int*)Regs->Arg5