avoid allocproc() returning a struct proc with non-zero p->sz

This commit is contained in:
Robert Morris 2019-07-02 11:17:50 -04:00
parent 1540c8b15a
commit b27f275014

View file

@ -124,9 +124,11 @@ freeproc(struct proc *p)
if(p->pagetable)
proc_freepagetable(p->pagetable, p->sz);
p->pagetable = 0;
p->sz = 0;
p->pid = 0;
p->parent = 0;
p->name[0] = 0;
p->chan = 0;
p->killed = 0;
p->state = UNUSED;
}