ref: 08b62ea6e90d0a59586de1308596a91ead4e2878
parent: c7504e95a80717616cf94ea89235ac6b31da1e67
author: cinap_lenrek <cinap_lenrek@gmx.de>
date: Mon Oct 22 17:59:52 EDT 2012
devproc: fix another channel leak, move the cclose(c) from proctext() to procopen.
--- a/sys/src/9/port/devproc.c
+++ b/sys/src/9/port/devproc.c
@@ -393,6 +393,7 @@
tc->offset = 0;
qunlock(&p->debug);
poperror();
+ cclose(c);
return tc;
case Qproc:
@@ -1203,12 +1204,13 @@
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;
}
--
⑨