Skip to content
Snippets Groups Projects
Commit 0992df4b authored by rsc's avatar rsc
Browse files

clear np->mem after freeing

parent 21a88dd0
No related branches found
No related tags found
No related merge requests found
...@@ -107,6 +107,7 @@ copyproc(struct proc* p) ...@@ -107,6 +107,7 @@ copyproc(struct proc* p)
np->kstack = kalloc(KSTACKSIZE); np->kstack = kalloc(KSTACKSIZE);
if(np->kstack == 0){ if(np->kstack == 0){
kfree(np->mem, np->sz); kfree(np->mem, np->sz);
np->mem = 0;
np->state = UNUSED; np->state = UNUSED;
return 0; return 0;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment