9pserve: fix memory leak in warning

This commit is contained in:
Ray Lai 2018-01-19 00:39:41 +08:00 committed by David du Colombier
parent 3473f4e5fd
commit d579124682

View file

@ -1248,6 +1248,8 @@ mread9p(Ioproc *io, int fd)
nn = convM2S(pkt, n, &m->tx);
if(nn != n){
fprint(2, "%T read bad packet from %d\n", fd);
free(m->tpkt);
free(m);
return nil;
}
return m;