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

@@ -1937,6 +1937,8 @@ unsigned long do_fork(int clone_flags, unsigned long newsp,
newproc->tids[i].thread = NULL;
++newproc->nr_tids;
}
kfree(tids);
}
/* Find an unused TID */