Merge branch 'master' of git://localhost/acess2
[tpg/acess2.git] / KernelLand / Kernel / binary.c
index ec5db13..208ab95 100644 (file)
@@ -2,7 +2,7 @@
  * Acess2
  * Common Binary Loader
  */
-#define DEBUG  1
+#define DEBUG  0
 #include <acess.h>
 #include <binary.h>
 #include <mm_virt.h>
@@ -194,9 +194,10 @@ int Proc_SysSpawn(const char *Binary, const char **ArgV, const char **EnvP, int
                Proc_Execve(Binary, ArgV, EnvP, size);
                for(;;);
        }
-       if( ret < 0 )
+       if( ret == -1 )
        {
                VFS_FreeSavedHandles(nFD, handles);
+               free(cachebuf);
        }
        
        return ret;

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