devproc: fix another channel leak, move the cclose(c) from proctext() to procopen.

This commit is contained in:
cinap_lenrek 2012-10-22 21:59:52 +02:00
parent 6680d50d4b
commit 22c7584780

View file

@ -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;
}