devproc: fix another channel leak, move the cclose(c) from proctext() to procopen.
This commit is contained in:
parent
6680d50d4b
commit
22c7584780
|
@ -393,6 +393,7 @@ procopen(Chan *c, int omode)
|
|||
tc->offset = 0;
|
||||
qunlock(&p->debug);
|
||||
poperror();
|
||||
cclose(c);
|
||||
return tc;
|
||||
|
||||
case Qproc:
|
||||
|
@ -1203,12 +1204,13 @@ proctext(Chan *c, Proc *p)
|
|||
error(Eprocdied);
|
||||
}
|
||||
|
||||
if(p->pid != PID(c->qid))
|
||||
if(p->pid != PID(c->qid)) {
|
||||
cclose(tc);
|
||||
error(Eprocdied);
|
||||
}
|
||||
|
||||
unlock(i);
|
||||
poperror();
|
||||
cclose(c);
|
||||
|
||||
return tc;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue