devip: dont raise error() out of Fsprotocone()

Fsprotoclone() is not supposed to raise error, but return nil.
ipopen() seemed to assume otherwise as it setup error label
before calling Fsprotoclone(). fix ipopen(), make Fsprotoclone()
return nil instead of raising error.
This commit is contained in:
cinap_lenrek 2013-05-05 04:28:50 +02:00
parent 9500191af6
commit d3b727db18

View file

@ -407,13 +407,8 @@ ipopen(Chan* c, int omode)
case Qclone:
p = f->p[PROTO(c->qid)];
qlock(p);
if(waserror()){
qunlock(p);
nexterror();
}
cv = Fsprotoclone(p, ATTACHER(c));
qunlock(p);
poperror();
if(cv == nil) {
error(Enodev);
break;
@ -1285,7 +1280,7 @@ retry:
if(c == nil){
c = malloc(sizeof(Conv));
if(c == nil)
error(Enomem);
return nil;
if(waserror()){
qfree(c->rq);
qfree(c->wq);
@ -1293,7 +1288,7 @@ retry:
qfree(c->sq);
free(c->ptcl);
free(c);
nexterror();
return nil;
}
c->p = p;
c->x = pp - p->conv;