clear np->mem after freeing

This commit is contained in:
rsc 2006-09-06 16:35:21 +00:00
parent 21a88dd053
commit 0992df4b90

1
proc.c
View file

@ -107,6 +107,7 @@ copyproc(struct proc* p)
np->kstack = kalloc(KSTACKSIZE);
if(np->kstack == 0){
kfree(np->mem, np->sz);
np->mem = 0;
np->state = UNUSED;
return 0;
}