do_fork(): fix tids memory leak; additional sanity checks

This commit is contained in:
Balazs Gerofi
2016-08-18 14:31:52 +09:00
parent bd6a2c2311
commit 7ebc34ddcc
6 changed files with 23 additions and 5 deletions

View File

@@ -373,6 +373,11 @@ static int process_msg_prepare_process(unsigned long rphys)
}
n = p->num_sections;
if (n > 16) {
kprintf("%s: ERROR: more ELF sections than 16??\n",
__FUNCTION__);
return -ENOMEM;
}
dkprintf("# of sections: %d\n", n);
if((pn = kmalloc(sizeof(struct program_load_desc)