libventi: handle rpc when not connected

R=rsc
CC=plan9port.codebot
http://codereview.appspot.com/5491051
This commit is contained in:
David du Colombier 2012-01-16 16:53:08 -05:00 committed by Russ Cox
parent d33a4d7f1b
commit fc638f7bd4

View file

@ -37,6 +37,12 @@ _vtrpc(VtConn *z, Packet *p, VtFcall *tx)
uchar tag, buf[2], *top;
Rwait *r, *rr;
if(z == nil){
werrstr("not connected");
packetfree(p);
return nil;
}
/* must malloc because stack could be private */
r = vtmallocz(sizeof(Rwait));