as rtm noticed, avoid doubly-freeing pipe page
This commit is contained in:
parent
deca9fef83
commit
e670a48358
1 changed files with 4 additions and 3 deletions
7
pipe.c
7
pipe.c
|
@ -69,10 +69,11 @@ pipeclose(struct pipe *p, int writable)
|
|||
p->readopen = 0;
|
||||
wakeup(&p->writep);
|
||||
}
|
||||
release(&p->lock);
|
||||
|
||||
if(p->readopen == 0 && p->writeopen == 0)
|
||||
if(p->readopen == 0 && p->writeopen == 0) {
|
||||
release(&p->lock);
|
||||
kfree((char*)p, PAGE);
|
||||
} else
|
||||
release(&p->lock);
|
||||
}
|
||||
|
||||
//PAGEBREAK: 30
|
||||
|
|
Loading…
Reference in a new issue