From d5791246822e27ef99a593d11518b457ce439a85 Mon Sep 17 00:00:00 2001 From: Ray Lai Date: Fri, 19 Jan 2018 00:39:41 +0800 Subject: 9pserve: fix memory leak in warning --- src/cmd/9pserve.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/cmd/9pserve.c') diff --git a/src/cmd/9pserve.c b/src/cmd/9pserve.c index 077715d6..24c80714 100644 --- a/src/cmd/9pserve.c +++ b/src/cmd/9pserve.c @@ -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; -- cgit v1.2.3