Kernel - Minor changes to SysSpawn
authorJohn Hodge (sonata) <[email protected]>
Sun, 11 Nov 2012 03:51:00 +0000 (11:51 +0800)
committerJohn Hodge (sonata) <[email protected]>
Sun, 11 Nov 2012 03:51:00 +0000 (11:51 +0800)
KernelLand/Kernel/binary.c
KernelLand/Kernel/syscalls.c

index 92baa73..a15db0b 100644 (file)
@@ -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;
index 99c7942..5a1d596 100644 (file)
@@ -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

UCC git Repository :: git.ucc.asn.au